diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2018-01-31 22:39:30 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2018-01-31 22:39:30 +0300 |
| commit | ba298725d194f753c0220bd9ac482e3d257a9ddc (patch) | |
| tree | 5ecb20ba5c368ea2b605c52ac3409492419dba26 /Zend/zend_compile.c | |
| parent | 3c6e1c2b817179f35d6822d7576866834728561d (diff) | |
| download | php-git-ba298725d194f753c0220bd9ac482e3d257a9ddc.tar.gz | |
Changed CATCH instruction format (extended_value moved into op2, op2 into result, result into extended_value)
Diffstat (limited to 'Zend/zend_compile.c')
| -rw-r--r-- | Zend/zend_compile.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index e8a16c4ef0..0b4941e1f4 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -5201,15 +5201,17 @@ void zend_compile_try(zend_ast *ast) /* {{{ */ zend_error_noreturn(E_COMPILE_ERROR, "Cannot re-assign $this"); } - opline->op2_type = IS_CV; - opline->op2.var = lookup_cv(CG(active_op_array), var_name); + opline->result_type = IS_CV; + opline->result.var = lookup_cv(CG(active_op_array), var_name); - opline->result.num = is_last_catch && is_last_class; + if (is_last_catch && is_last_class) { + opline->extended_value = ZEND_LAST_CATCH; + } if (!is_last_class) { jmp_multicatch[j] = zend_emit_jump(0); opline = &CG(active_op_array)->opcodes[opnum_catch]; - opline->extended_value = get_next_op_number(CG(active_op_array)); + opline->op2.opline_num = get_next_op_number(CG(active_op_array)); } } @@ -5227,7 +5229,7 @@ void zend_compile_try(zend_ast *ast) /* {{{ */ opline = &CG(active_op_array)->opcodes[opnum_catch]; if (!is_last_catch) { - opline->extended_value = get_next_op_number(CG(active_op_array)); + opline->op2.opline_num = get_next_op_number(CG(active_op_array)); } } |
