@@ -149,7 +149,7 @@ ZEND_API HashTable *zend_std_get_debug_info(zend_object *object, int *is_temp) /
149149 return object -> handlers -> get_properties (object );
150150 }
151151
152- zend_call_method_with_0_params ( object , ce , & ce -> __debugInfo , ZEND_DEBUGINFO_FUNC_NAME , & retval );
152+ zend_call_known_instance_method_with_0_params ( ce -> __debugInfo , object , & retval );
153153 if (Z_TYPE (retval ) == IS_ARRAY ) {
154154 if (!Z_REFCOUNTED (retval )) {
155155 * is_temp = 1 ;
@@ -177,145 +177,56 @@ ZEND_API HashTable *zend_std_get_debug_info(zend_object *object, int *is_temp) /
177177
178178static void zend_std_call_getter (zend_object * zobj , zend_string * prop_name , zval * retval ) /* {{{ */
179179{
180- zend_class_entry * ce = zobj -> ce ;
181180 zend_class_entry * orig_fake_scope = EG (fake_scope );
182- zend_fcall_info fci ;
183- zend_fcall_info_cache fcic ;
184181 zval member ;
185182
186183 EG (fake_scope ) = NULL ;
187184
188- /* __get handler is called with one argument:
189- property name
190-
191- it should return whether the call was successful or not
192- */
193-
194185 ZVAL_STR (& member , prop_name );
195-
196- fci .size = sizeof (fci );
197- fci .object = zobj ;
198- fci .retval = retval ;
199- fci .param_count = 1 ;
200- fci .params = & member ;
201- fci .no_separation = 1 ;
202- ZVAL_UNDEF (& fci .function_name ); /* Unused */
203-
204- fcic .function_handler = ce -> __get ;
205- fcic .called_scope = ce ;
206- fcic .object = zobj ;
207-
208- zend_call_function (& fci , & fcic );
186+ zend_call_known_instance_method_with_1_params (zobj -> ce -> __get , zobj , retval , & member );
209187
210188 EG (fake_scope ) = orig_fake_scope ;
211189}
212190/* }}} */
213191
214192static void zend_std_call_setter (zend_object * zobj , zend_string * prop_name , zval * value ) /* {{{ */
215193{
216- zend_class_entry * ce = zobj -> ce ;
217194 zend_class_entry * orig_fake_scope = EG (fake_scope );
218- zend_fcall_info fci ;
219- zend_fcall_info_cache fcic ;
220- zval args [2 ], ret ;
195+ zval args [2 ];
221196
222197 EG (fake_scope ) = NULL ;
223198
224- /* __set handler is called with two arguments:
225- property name
226- value to be set
227- */
228-
229199 ZVAL_STR (& args [0 ], prop_name );
230200 ZVAL_COPY_VALUE (& args [1 ], value );
231- ZVAL_UNDEF (& ret );
232-
233- fci .size = sizeof (fci );
234- fci .object = zobj ;
235- fci .retval = & ret ;
236- fci .param_count = 2 ;
237- fci .params = args ;
238- fci .no_separation = 1 ;
239- ZVAL_UNDEF (& fci .function_name ); /* Unused */
240-
241- fcic .function_handler = ce -> __set ;
242- fcic .called_scope = ce ;
243- fcic .object = zobj ;
244-
245- zend_call_function (& fci , & fcic );
246- zval_ptr_dtor (& ret );
201+ zend_call_known_instance_method (zobj -> ce -> __set , zobj , NULL , 2 , args );
247202
248203 EG (fake_scope ) = orig_fake_scope ;
249204}
250205/* }}} */
251206
252207static void zend_std_call_unsetter (zend_object * zobj , zend_string * prop_name ) /* {{{ */
253208{
254- zend_class_entry * ce = zobj -> ce ;
255209 zend_class_entry * orig_fake_scope = EG (fake_scope );
256- zend_fcall_info fci ;
257- zend_fcall_info_cache fcic ;
258- zval ret , member ;
210+ zval member ;
259211
260212 EG (fake_scope ) = NULL ;
261213
262- /* __unset handler is called with one argument:
263- property name
264- */
265-
266214 ZVAL_STR (& member , prop_name );
267- ZVAL_UNDEF (& ret );
268-
269- fci .size = sizeof (fci );
270- fci .object = zobj ;
271- fci .retval = & ret ;
272- fci .param_count = 1 ;
273- fci .params = & member ;
274- fci .no_separation = 1 ;
275- ZVAL_UNDEF (& fci .function_name ); /* Unused */
276-
277- fcic .function_handler = ce -> __unset ;
278- fcic .called_scope = ce ;
279- fcic .object = zobj ;
280-
281- zend_call_function (& fci , & fcic );
282- zval_ptr_dtor (& ret );
215+ zend_call_known_instance_method_with_1_params (zobj -> ce -> __unset , zobj , NULL , & member );
283216
284217 EG (fake_scope ) = orig_fake_scope ;
285218}
286219/* }}} */
287220
288221static void zend_std_call_issetter (zend_object * zobj , zend_string * prop_name , zval * retval ) /* {{{ */
289222{
290- zend_class_entry * ce = zobj -> ce ;
291223 zend_class_entry * orig_fake_scope = EG (fake_scope );
292- zend_fcall_info fci ;
293- zend_fcall_info_cache fcic ;
294224 zval member ;
295225
296226 EG (fake_scope ) = NULL ;
297227
298- /* __isset handler is called with one argument:
299- property name
300-
301- it should return whether the property is set or not
302- */
303-
304228 ZVAL_STR (& member , prop_name );
305-
306- fci .size = sizeof (fci );
307- fci .object = zobj ;
308- fci .retval = retval ;
309- fci .param_count = 1 ;
310- fci .params = & member ;
311- fci .no_separation = 1 ;
312- ZVAL_UNDEF (& fci .function_name ); /* Unused */
313-
314- fcic .function_handler = ce -> __isset ;
315- fcic .called_scope = ce ;
316- fcic .object = zobj ;
317-
318- zend_call_function (& fci , & fcic );
229+ zend_call_known_instance_method_with_1_params (zobj -> ce -> __isset , zobj , retval , & member );
319230
320231 EG (fake_scope ) = orig_fake_scope ;
321232}
@@ -1803,7 +1714,7 @@ ZEND_API int zend_std_cast_object_tostring(zend_object *readobj, zval *writeobj,
18031714 zend_class_entry * fake_scope = EG (fake_scope );
18041715 EG (fake_scope ) = NULL ;
18051716 GC_ADDREF (readobj );
1806- zend_call_method_with_0_params ( readobj , ce , & ce -> __tostring , "__tostring" , & retval );
1717+ zend_call_known_instance_method_with_0_params ( ce -> __tostring , readobj , & retval );
18071718 zend_object_release (readobj );
18081719 EG (fake_scope ) = fake_scope ;
18091720 if (EXPECTED (Z_TYPE (retval ) == IS_STRING )) {
0 commit comments