cvs: ZendEngine2 / zend_compile.c

From: Date: Tue, 18 Nov 2003 07:19:55 +0000
Subject: cvs: ZendEngine2 / zend_compile.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1993@lists.php.net to get a copy of this message
helly Tue Nov 18 02:19:55 2003 EDT Modified files: /ZendEngine2 zend_compile.c Log: Backpatch the correct opcode for list(), property overloading needs more opcodes (Bugfix #26257). Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.493 ZendEngine2/zend_compile.c:1.494 --- ZendEngine2/zend_compile.c:1.493 Thu Nov 13 01:40:34 2003 +++ ZendEngine2/zend_compile.c Tue Nov 18 02:19:55 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.493 2003/11/13 06:40:34 andi Exp $ */ +/* $Id: zend_compile.c,v 1.494 2003/11/18 07:19:55 helly Exp $ */ #include "zend_language_parser.h" #include "zend.h" @@ -2838,6 +2838,9 @@ zend_llist_element *dimension; zend_op *opline; znode last_container; + int opcode_index; + int last_op_number; + zend_op *last_op; le = CG(list_llist).head; while (le) { @@ -2877,8 +2880,14 @@ ((list_llist_element *) le->data)->value = last_container; zend_llist_destroy(&((list_llist_element *) le->data)->dimensions); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); + opcode_index = - 1; + last_op_number = get_next_op_number(CG(active_op_array))-1; + last_op = &CG(active_op_array)->opcodes[last_op_number]; + if (last_op->opcode == ZEND_FETCH_OBJ_W) { + opcode_index = - 2; + } zend_do_assign(result, &((list_llist_element *) le->data)->var, &((list_llist_element *) le->data)->value TSRMLS_CC); - CG(active_op_array)->opcodes[CG(active_op_array)->last-1].result.u.EA.type |= EXT_TYPE_UNUSED; + CG(active_op_array)->opcodes[CG(active_op_array)->last + opcode_index].result.u.EA.type |= EXT_TYPE_UNUSED; le = le->next; } zend_llist_destroy(&CG(dimension_llist));

« previous php.zend-engine.cvs (#1993) next »