From f304523f896c0caeffe8ea5666b245e39ec5dc83 Mon Sep 17 00:00:00 2001 From: Xuefer Date: Sat, 5 Jan 2008 11:52:35 +0000 Subject: [PATCH] PHP_6: added goto support git-svn-id: svn://svn.lighttpd.net/xcache/trunk@515 c26eb9a1-5813-0410-bd6c-c2e55f420ca7 --- processor/processor.m4 | 3 +++ utils.c | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/processor/processor.m4 b/processor/processor.m4 index e749f11..58efbc4 100644 --- a/processor/processor.m4 +++ b/processor/processor.m4 @@ -474,6 +474,9 @@ DEF_STRUCT_P_FUNC(`zend_op', , `dnl {{{ #ifdef ZEND_ENGINE_2_1 IFCOPY(` switch (src->opcode) { +#ifdef ZEND_GOTO + case ZEND_GOTO: +#endif case ZEND_JMP: dst->op1.u.jmp_addr = processor->active_opcodes_dst + (src->op1.u.jmp_addr - processor->active_opcodes_src); break; diff --git a/utils.c b/utils.c index 9c71cf6..f2f545a 100644 --- a/utils.c +++ b/utils.c @@ -143,6 +143,9 @@ int xc_undo_pass_two(zend_op_array *op_array TSRMLS_DC) /* {{{ */ while (opline < end) { #ifdef ZEND_ENGINE_2_1 switch (opline->opcode) { +#ifdef ZEND_GOTO + case ZEND_GOTO: +#endif case ZEND_JMP: opline->op1.u.opline_num = opline->op1.u.jmp_addr - op_array->opcodes; assert(opline->op1.u.opline_num < op_array->last); @@ -193,6 +196,9 @@ int xc_redo_pass_two(zend_op_array *op_array TSRMLS_DC) /* {{{ */ } #ifdef ZEND_ENGINE_2_1 switch (opline->opcode) { +#ifdef ZEND_GOTO + case ZEND_GOTO: +#endif case ZEND_JMP: assert(opline->op1.u.opline_num < op_array->last); opline->op1.u.jmp_addr = op_array->opcodes + opline->op1.u.opline_num; @@ -293,6 +299,9 @@ int xc_foreach_early_binding_class(zend_op_array *op_array, void (*callback)(zen end = opline + op_array->last; while (opline < end) { switch (opline->opcode) { +#ifdef ZEND_GOTO + case ZEND_GOTO: +#endif case ZEND_JMP: next = begin + opline->op1.u.opline_num; break;