diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-07-10 04:44:21 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-07-10 04:44:21 +0300 |
commit | ef1b588f6a39bcc2c0d5fad9f2094bb011aeaf0b (patch) | |
tree | c96d23b817c0b8c745b814ea76c65404aa32f896 /Zend/zend_opcode.c | |
parent | 44f7348caa188d6c2b6228eaa622d0ef86b2647e (diff) | |
download | php-git-ef1b588f6a39bcc2c0d5fad9f2094bb011aeaf0b.tar.gz |
Resolve GOTO at compile time and replace it with sequnce of FREE/FE_FREE and JMP.
Diffstat (limited to 'Zend/zend_opcode.c')
-rw-r--r-- | Zend/zend_opcode.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index a971a5e900..62b58b4e57 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -700,11 +700,8 @@ static void zend_resolve_finally_calls(zend_op_array *op_array) break; case ZEND_GOTO: if (Z_TYPE_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) != IS_LONG) { - uint32_t num = opline->op2.constant; - ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline->op2); - zend_resolve_goto_label(op_array, opline, 1); - opline->op2.constant = num; + zend_resolve_goto_label(op_array, NULL, opline); } /* break omitted intentionally */ case ZEND_JMP: @@ -787,7 +784,7 @@ ZEND_API int pass_two(zend_op_array *op_array) break; case ZEND_GOTO: if (Z_TYPE_P(RT_CONSTANT(op_array, opline->op2)) != IS_LONG) { - zend_resolve_goto_label(op_array, opline, 1); + zend_resolve_goto_label(op_array, NULL, opline); } /* break omitted intentionally */ case ZEND_JMP: |