com php-src: Get rid of ZEND_FAST_CALL_UNBOUND: Zend/ zend_compile.c Zend/zend_compile.h Zend/zend_opco de.c

From: Date: Tue, 04 Aug 2015 05:35:40 +0000
Subject: com php-src: Get rid of ZEND_FAST_CALL_UNBOUND: Zend/ zend_compile.c Zend/zend_compile.h Zend/zend_opco de.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-88294@lists.php.net to get a copy of this message
Commit: 58596897e97da0a3fae82a6a3b17bbfa1e7de689 Author: Dmitry Stogov <dmitry@zend.com> Tue, 4 Aug 2015 08:35:40 +0300 Parents: a16aa4c42c0483406b53518e28259162c1b7699f Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=58596897e97da0a3fae82a6a3b17bbfa1e7de689 Log: Get rid of ZEND_FAST_CALL_UNBOUND Changed paths: M Zend/zend_compile.c M Zend/zend_compile.h M Zend/zend_opcode.c Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 6deea13..8fd71d0 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3477,7 +3477,6 @@ static int zend_handle_loops_and_finally_ex(zend_long depth) /* {{{ */ SET_UNUSED(opline->op1); SET_UNUSED(opline->op2); opline->op1.num = loop_var->u.try_catch_offset; - opline->extended_value = ZEND_FAST_CALL_UNBOUND; } else if (loop_var->opcode == ZEND_RETURN) { /* Stack separator */ break; @@ -4126,7 +4125,7 @@ void zend_compile_try(zend_ast *ast) /* {{{ */ zend_stack_del_top(&CG(loop_var_stack)); opline = zend_emit_op(NULL, ZEND_FAST_CALL, NULL, NULL); - opline->op1.opline_num = opnum_jmp + 1; + opline->op1.num = try_catch_offset; opline->result_type = IS_TMP_VAR; opline->result.var = CG(context).fast_call_var; diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index ae9a280..2db45e5 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -946,7 +946,6 @@ static zend_always_inline int zend_check_arg_send_type(const zend_function *zf, #define ZEND_FAST_RET_TO_FINALLY 2 #define ZEND_FAST_CALL_FROM_FINALLY 1 -#define ZEND_FAST_CALL_UNBOUND 2 #define ZEND_ARRAY_ELEMENT_REF (1<<0) #define ZEND_ARRAY_NOT_PACKED (1<<1) diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 237e7cd..66ad24e 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -523,10 +523,8 @@ static void zend_resolve_fast_call(zend_op_array *op_array, uint32_t op_num) if (finally_op_num) { /* Must be ZEND_FAST_CALL */ ZEND_ASSERT(op_array->opcodes[finally_op_num - 2].opcode == ZEND_FAST_CALL); - if (op_array->opcodes[op_num].extended_value == 0) { - op_array->opcodes[op_num].extended_value = ZEND_FAST_CALL_FROM_FINALLY; - op_array->opcodes[op_num].op2.opline_num = finally_op_num - 2; - } + op_array->opcodes[op_num].extended_value = ZEND_FAST_CALL_FROM_FINALLY; + op_array->opcodes[op_num].op2.opline_num = finally_op_num - 2; } } @@ -603,10 +601,7 @@ ZEND_API int pass_two(zend_op_array *op_array) while (opline < end) { switch (opline->opcode) { case ZEND_FAST_CALL: - if (opline->extended_value == ZEND_FAST_CALL_UNBOUND) { - opline->op1.opline_num = op_array->try_catch_array[opline->op1.num].finally_op; - opline->extended_value = 0; - } + opline->op1.opline_num = op_array->try_catch_array[opline->op1.num].finally_op; zend_resolve_fast_call(op_array, opline - op_array->opcodes); ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op1); break;

« previous php.cvs (#88294) next »