diff options
author | Nikita Popov <nikic@php.net> | 2015-12-14 12:31:00 +0100 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-12-14 12:31:00 +0100 |
commit | 091917896364be52f35be5aafcccacb8b8a908ce (patch) | |
tree | b0057ab324e32d61ce8c8f7786544c7ae141e636 /Zend/zend_opcode.c | |
parent | 732fe984f2e49a33ad995c03815b5d5ebe29fc60 (diff) | |
download | php-git-091917896364be52f35be5aafcccacb8b8a908ce.tar.gz |
Add result op for ASSERT_CHECK to fix SSA
Otherwise one source of the phi node at the join point will be
borked.
I'm marking the ASSERT_CHECK result as unused in pass2, which is
a bit ugly.
Diffstat (limited to 'Zend/zend_opcode.c')
-rw-r--r-- | Zend/zend_opcode.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index f6ac06e04f..0ce6b85938 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -687,7 +687,13 @@ ZEND_API int pass_two(zend_op_array *op_array) case ZEND_NEW: case ZEND_FE_RESET_R: case ZEND_FE_RESET_RW: + ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op2); + break; case ZEND_ASSERT_CHECK: + /* If result of assert is unused, result of check is unused as well */ + if (op_array->opcodes[opline->op2.opline_num - 1].result_type & EXT_TYPE_UNUSED) { + opline->result_type |= EXT_TYPE_UNUSED; + } ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op2); break; case ZEND_FE_FETCH_R: |