@@ -878,8 +878,6 @@ ZEND_API void zend_create_fake_closure(zval *res, zend_function *func, zend_clas
878878}
879879/* }}} */
880880
881- static zend_arg_info trampoline_arg_info [1 ];
882-
883881void zend_closure_from_frame (zval * return_value , const zend_execute_data * call ) { /* {{{ */
884882 zval instance ;
885883 zend_internal_function trampoline ;
@@ -904,9 +902,7 @@ void zend_closure_from_frame(zval *return_value, const zend_execute_data *call)
904902 trampoline .function_name = mptr -> common .function_name ;
905903 trampoline .scope = mptr -> common .scope ;
906904 trampoline .doc_comment = NULL ;
907- if (trampoline .fn_flags & ZEND_ACC_VARIADIC ) {
908- trampoline .arg_info = trampoline_arg_info ;
909- }
905+ trampoline .arg_info = mptr -> common .arg_info ;
910906 trampoline .attributes = mptr -> common .attributes ;
911907
912908 zend_free_trampoline (mptr );
@@ -943,11 +939,3 @@ void zend_closure_bind_var_ex(zval *closure_zv, uint32_t offset, zval *val) /* {
943939 ZVAL_COPY_VALUE (var , val );
944940}
945941/* }}} */
946-
947- void zend_closure_startup (void )
948- {
949- /* __call and __callStatic name the arguments "$arguments" in the docs. */
950- trampoline_arg_info [0 ].name = zend_string_init_interned ("arguments" , strlen ("arguments" ), true);
951- trampoline_arg_info [0 ].type = (zend_type )ZEND_TYPE_INIT_CODE (IS_MIXED , false, _ZEND_ARG_INFO_FLAGS (false, 1 , 0 ));
952- trampoline_arg_info [0 ].default_value = NULL ;
953- }
0 commit comments