Skip to content

Commit 57ad5b3

Browse files
committed
Consider op1 literal of FETCH_OBJ_R
FETCH_OBJ_R may have an op1 CONST operand, even though it will always error. We should take this into account when compacting literals.
1 parent 99c48a2 commit 57ad5b3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/opcache/Optimizer/compact_literals.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
223223
case ZEND_POST_INC_OBJ:
224224
case ZEND_POST_DEC_OBJ:
225225
case ZEND_ISSET_ISEMPTY_PROP_OBJ:
226+
if (opline->op1_type == IS_CONST) {
227+
LITERAL_INFO(opline->op1.constant, LITERAL_VALUE, 1);
228+
}
226229
if (opline->op2_type == IS_CONST) {
227230
LITERAL_INFO(opline->op2.constant, LITERAL_PROPERTY, 1);
228231
}

0 commit comments

Comments
 (0)