mirror of
https://github.com/php/php-src.git
synced 2024-12-15 12:54:57 +08:00
parent
6da44fefb2
commit
f208187773
@ -2157,6 +2157,24 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||
t1 = OP1_INFO();
|
||||
t2 = OP2_INFO();
|
||||
|
||||
/* If one of the operands cannot have any type, this means the operand derives from
|
||||
* unreachable code. Propagate the empty result early, so that that the following
|
||||
* code may assume that operands have at least one type. */
|
||||
if (!(t1 & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_CLASS|MAY_BE_ERROR))
|
||||
|| !(t2 & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_CLASS|MAY_BE_ERROR))) {
|
||||
tmp = 0;
|
||||
if (ssa_ops[i].result_def >= 0) {
|
||||
UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
|
||||
}
|
||||
if (ssa_ops[i].op1_def >= 0) {
|
||||
UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
|
||||
}
|
||||
if (ssa_ops[i].op2_def >= 0) {
|
||||
UPDATE_SSA_TYPE(tmp, ssa_ops[i].op2_def);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (opline->opcode) {
|
||||
case ZEND_ADD:
|
||||
case ZEND_SUB:
|
||||
|
Loading…
Reference in New Issue
Block a user