Skip to content

Commit a4fa551

Browse files
committed
Fix QM_ASSIGN optimization, again
1 parent 9ddff66 commit a4fa551

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Zend/Optimizer/block_pass.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,11 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array
299299
++(*opt_count);
300300
if (src->op1_type & (IS_VAR|IS_TMP_VAR)) {
301301
src->opcode = ZEND_FREE;
302-
} else {
302+
} else if (src->op1_type == IS_CONST) {
303303
MAKE_NOP(src);
304+
} else if (src->op1_type == IS_CV) {
305+
src->opcode = ZEND_CHECK_VAR;
306+
SET_UNUSED(src->result);
304307
}
305308
break;
306309
default:

0 commit comments

Comments
 (0)