@@ -2287,7 +2287,7 @@ static inline zend_bool zend_is_unticked_stmt(zend_ast *ast) /* {{{ */
22872287{
22882288 return ast -> kind == ZEND_AST_STMT_LIST || ast -> kind == ZEND_AST_LABEL
22892289 || ast -> kind == ZEND_AST_PROP_DECL || ast -> kind == ZEND_AST_CLASS_CONST_DECL
2290- || ast -> kind == ZEND_AST_USE_TRAIT || ast -> kind == ZEND_AST_METHOD || ast -> kind == ZEND_AST_METHOD_EX ;
2290+ || ast -> kind == ZEND_AST_USE_TRAIT || ast -> kind == ZEND_AST_METHOD ;
22912291}
22922292/* }}} */
22932293
@@ -5634,8 +5634,9 @@ void zend_compile_closure_uses(zend_ast *ast) /* {{{ */
56345634}
56355635/* }}} */
56365636
5637- void zend_begin_method_decl_ex ( zend_class_entry * ce , zend_op_array * op_array , zend_string * name , zend_bool has_body ) /* {{{ */
5637+ void zend_begin_method_decl ( zend_op_array * op_array , zend_string * name , zend_bool has_body ) /* {{{ */
56385638{
5639+ zend_class_entry * ce = CG (active_class_entry );
56395640 zend_bool in_interface = (ce -> ce_flags & ZEND_ACC_INTERFACE ) != 0 ;
56405641 zend_bool in_trait = (ce -> ce_flags & ZEND_ACC_TRAIT ) != 0 ;
56415642 zend_bool is_public = (op_array -> fn_flags & ZEND_ACC_PUBLIC ) != 0 ;
@@ -5676,11 +5677,7 @@ void zend_begin_method_decl_ex(zend_class_entry *ce, zend_op_array *op_array, ze
56765677
56775678 if (zend_hash_add_ptr (& ce -> function_table , lcname , op_array ) == NULL ) {
56785679 zend_error_noreturn (E_COMPILE_ERROR , "Cannot redeclare %s::%s()" ,
5679- ZSTR_VAL (ce -> name ), ZSTR_VAL (name ));
5680- }
5681-
5682- if (ce -> type == ZEND_INTERNAL_CLASS ) {
5683- zend_hash_add_ptr (CG (class_extension_functions ), lcname , ce );
5680+ ZSTR_VAL (ce -> name ), ZSTR_VAL (name ));
56845681 }
56855682
56865683 if (in_interface ) {
@@ -5813,20 +5810,6 @@ void zend_begin_method_decl_ex(zend_class_entry *ce, zend_op_array *op_array, ze
58135810}
58145811/* }}} */
58155812
5816- void zend_begin_method_decl_ex2 (zend_string * class_name , zend_op_array * op_array , zend_string * name , zend_bool has_body ) /* {{{ */
5817- {
5818- zend_class_entry * ce = zend_lookup_class (class_name );
5819- zend_begin_method_decl_ex (ce , op_array , name , has_body );
5820- }
5821- /* }}} */
5822-
5823- void zend_begin_method_decl (zend_op_array * op_array , zend_string * name , zend_bool has_body ) /* {{{ */
5824- {
5825- zend_class_entry * ce = CG (active_class_entry );
5826- zend_begin_method_decl_ex (ce , op_array , name , has_body );
5827- }
5828- /* }}} */
5829-
58305813static void zend_begin_func_decl (znode * result , zend_op_array * op_array , zend_ast_decl * decl , zend_bool toplevel ) /* {{{ */
58315814{
58325815 zend_ast * params_ast = decl -> child [0 ];
@@ -5893,17 +5876,10 @@ void zend_compile_func_decl(znode *result, zend_ast *ast, zend_bool toplevel) /*
58935876{
58945877 zend_ast_decl * decl = (zend_ast_decl * ) ast ;
58955878 zend_ast * params_ast = decl -> child [0 ];
5896- zend_ast * uses_ast ;
5879+ zend_ast * uses_ast = decl -> child [ 1 ] ;
58975880 zend_ast * stmt_ast = decl -> child [2 ];
58985881 zend_ast * return_type_ast = decl -> child [3 ];
58995882 zend_bool is_method = decl -> kind == ZEND_AST_METHOD ;
5900- zend_bool is_ex_method = decl -> kind == ZEND_AST_METHOD_EX ;
5901-
5902- if (is_ex_method ){
5903- uses_ast = NULL ;
5904- } else {
5905- uses_ast = decl -> child [1 ];
5906- }
59075883
59085884 zend_op_array * orig_op_array = CG (active_op_array );
59095885 zend_op_array * op_array = zend_arena_alloc (& CG (arena ), sizeof (zend_op_array ));
@@ -5925,10 +5901,6 @@ void zend_compile_func_decl(znode *result, zend_ast *ast, zend_bool toplevel) /*
59255901 if (is_method ) {
59265902 zend_bool has_body = stmt_ast != NULL ;
59275903 zend_begin_method_decl (op_array , decl -> name , has_body );
5928- } else if (is_ex_method ){
5929- zend_bool has_body = stmt_ast != NULL ;
5930- zend_string * class_name = zend_ast_get_str (decl -> child [1 ]);
5931- zend_begin_method_decl_ex2 (class_name , op_array , decl -> name , has_body );
59325904 } else {
59335905 zend_begin_func_decl (result , op_array , decl , toplevel );
59345906 if (uses_ast ) {
@@ -8150,7 +8122,6 @@ void zend_compile_stmt(zend_ast *ast) /* {{{ */
81508122 break ;
81518123 case ZEND_AST_FUNC_DECL :
81528124 case ZEND_AST_METHOD :
8153- case ZEND_AST_METHOD_EX :
81548125 zend_compile_func_decl (NULL , ast , 0 );
81558126 break ;
81568127 case ZEND_AST_PROP_DECL :
0 commit comments