cvs: ZendEngine2 / zend_compile.c zend_execute.c zend_globals.h

From: Date: Tue, 30 Jul 2002 22:19:50 +0000
Subject: cvs: ZendEngine2 / zend_compile.c zend_execute.c zend_globals.h
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-287@lists.php.net to get a copy of this message
jason Tue Jul 30 18:19:50 2002 EDT Modified files: /ZendEngine2 zend_compile.c zend_execute.c zend_globals.h Log: MFZE1 global declare Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.299 ZendEngine2/zend_compile.c:1.300 --- ZendEngine2/zend_compile.c:1.299 Tue Jul 30 18:14:39 2002 +++ ZendEngine2/zend_compile.c Tue Jul 30 18:19:50 2002 @@ -2864,6 +2864,7 @@ void zend_do_declare_begin(TSRMLS_D) { zend_stack_push(&CG(declare_stack), &CG(declarables), sizeof(zend_declarables)); + CG(declarables).beginop = get_next_op_number(CG(active_op_array)); } @@ -2884,7 +2885,10 @@ zend_declarables *declarables; zend_stack_top(&CG(declare_stack), (void **) &declarables); - CG(declarables) = *declarables; + /* We should restore if there was more than (current - start) - (ticks?1:0) opcodes */ + if ((get_next_op_number(CG(active_op_array)) - CG(declarables).beginop) - ((CG(declarables).ticks.value.lval)?1:0)) { + CG(declarables) = *declarables; + } } Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.355 ZendEngine2/zend_execute.c:1.356 --- ZendEngine2/zend_execute.c:1.355 Tue Jul 30 00:07:15 2002 +++ ZendEngine2/zend_execute.c Tue Jul 30 18:19:50 2002 @@ -3108,7 +3108,7 @@ do_bind_function_or_class(EX(opline), EG(function_table), EG(class_table), 0); NEXT_OPCODE(); case ZEND_TICKS: - if (++EG(ticks_count)==EX(opline)->op1.u.constant.value.lval) { + if (++EG(ticks_count)>=EX(opline)->op1.u.constant.value.lval) { EG(ticks_count)=0; if (zend_ticks_function) { zend_ticks_function(EX(opline)->op1.u.constant.value.lval); Index: ZendEngine2/zend_globals.h diff -u ZendEngine2/zend_globals.h:1.101 ZendEngine2/zend_globals.h:1.102 --- ZendEngine2/zend_globals.h:1.101 Sat Jun 22 10:37:49 2002 +++ ZendEngine2/zend_globals.h Tue Jul 30 18:19:50 2002 @@ -58,6 +58,7 @@ typedef struct _zend_declarables { zval ticks; + zend_uint beginop; } zend_declarables;

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