From: Zeev Suraski Date: Sat, 5 Jun 1999 18:47:36 +0000 (+0000) Subject: - Fixed Karl's bug report. It's not really a thorough fix, we really need to rethink... X-Git-Tag: BEFORE_REMOVING_GC_STEP1~201 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b2fe60467468fef799a7ae0b9f943a62a5ec0df;p=php - Fixed Karl's bug report. It's not really a thorough fix, we really need to rethink the INIT_FCALL/DO_FCALL issue. - Fixed numerous AiCount problems --- diff --git a/Zend/zend-scanner.l b/Zend/zend-scanner.l index 0b6b00d4b8..051f69ff49 100644 --- a/Zend/zend-scanner.l +++ b/Zend/zend-scanner.l @@ -1081,11 +1081,11 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+ [^*]+ { - HANDLE_NEWLINES(yytext, yyleng); yymore(); } "*/" { + HANDLE_NEWLINES(yytext, yyleng); BEGIN(ST_IN_SCRIPTING); return T_COMMENT; } diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index c9f6841a32..9028da64d6 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -724,6 +724,7 @@ void do_begin_dynamic_function_call(znode *function_name CLS_DC) if (last_op_number>=0 && CG(active_op_array)->opcodes[last_op_number].opcode == ZEND_FETCH_OBJ_R) { CG(active_op_array)->opcodes[last_op_number].opcode = ZEND_INIT_FCALL_BY_NAME; + CG(active_op_array)->opcodes[last_op_number].extended_value = ZEND_MEMBER_FUNC_CALL; } else { zend_op *opline = get_next_op(CG(active_op_array) CLS_CC); diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 5f8660da20..39dd7be2f4 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -378,6 +378,9 @@ static inline void zend_fetch_var_address(znode *result, znode *op1, znode *op2, target_symbol_table = EG(active_symbol_table); break; case ZEND_FETCH_GLOBAL: + if (op1->op_type == IS_VAR) { + EG(AiCount)++; + } target_symbol_table = &EG(symbol_table); break; case ZEND_FETCH_STATIC: @@ -550,7 +553,7 @@ static inline void zend_fetch_dimension_address(znode *result, znode *op1, znode return; } - if (container->type == IS_STRING && container->value.str.val == undefined_variable_string) { + if (container->type == IS_STRING && container->value.str.len==0) { switch (type) { case BP_VAR_RW: case BP_VAR_W: @@ -718,7 +721,7 @@ static inline void zend_fetch_property_address(znode *result, znode *op1, znode - if (container->type == IS_STRING && container->value.str.val == undefined_variable_string) { + if (container->type == IS_STRING && container->value.str.len==0) { switch (type) { case BP_VAR_RW: case BP_VAR_W: @@ -1383,6 +1386,7 @@ overloaded_function_call_cont: call_overloaded_function(opline->extended_value, &Ts[opline->result.u.var].tmp_var, &EG(regular_list), &EG(persistent_list) ELS_CC); efree(function_being_called); } + function_being_called = NULL; function_state.function = (zend_function *) op_array; EG(function_state_ptr) = &function_state; zend_ptr_stack_clear_multiple(ELS_C);