Skip to content

Commit 61e385a

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fixed type inference for OP_DATA
2 parents 332a367 + 7a8ffce commit 61e385a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ext/opcache/Optimizer/zend_inference.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1941,6 +1941,18 @@ static void add_usages(const zend_op_array *op_array, zend_ssa *ssa, zend_bitset
19411941
if (op->op2_def >= 0) {
19421942
zend_bitset_incl(worklist, op->op2_def);
19431943
}
1944+
} else if (use + 1 < op_array->last
1945+
&& op_array->opcodes[use + 1].opcode == ZEND_OP_DATA) {
1946+
op++;
1947+
if (op->result_def >= 0) {
1948+
zend_bitset_incl(worklist, op->result_def);
1949+
}
1950+
if (op->op1_def >= 0) {
1951+
zend_bitset_incl(worklist, op->op1_def);
1952+
}
1953+
if (op->op2_def >= 0) {
1954+
zend_bitset_incl(worklist, op->op2_def);
1955+
}
19441956
}
19451957
use = zend_ssa_next_use(ssa->ops, var, use);
19461958
} while (use >= 0);

0 commit comments

Comments
 (0)