From 5faedf5b3e05f0a8c226ac15d90be3d9ade38518 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 5 Feb 2016 15:23:23 +0100 Subject: Remove EXT_TYPE_UNUSED in favor of IS_UNUSED This means we no longer allocate an unused VAR for the retval of instructions that support unused results. Nearly all instructions already used the result variable only if it was used. The only exception to this was the return value variable for internal function call results. I've adjusted the code to use a stack zval for the unused return case now. As we have retval specialization now, we know that it doesn't matter. --- Zend/zend_opcode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zend/zend_opcode.c') diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index d58e59b1c1..ab67a88272 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -680,8 +680,8 @@ ZEND_API int pass_two(zend_op_array *op_array) 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; + if (op_array->opcodes[opline->op2.opline_num - 1].result_type == IS_UNUSED) { + opline->result_type = IS_UNUSED; } ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op2); break; -- cgit v1.2.1