Skip to content

Commit fdb8bff

Browse files
committed
Set op1 result earlier
1 parent b1a0c4b commit fdb8bff

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Zend/Optimizer/sccp.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,12 @@ static void sccp_visit_instr(scdf_ctx *scdf, zend_op *opline, zend_ssa_op *ssa_o
10521052
case ZEND_SEND_VAL:
10531053
case ZEND_SEND_VAR:
10541054
{
1055+
if (opline->opcode == ZEND_SEND_VAR) {
1056+
/* TODO ? */
1057+
/* Can be UNDEF or a value copy */
1058+
SET_RESULT_BOT(op1);
1059+
}
1060+
10551061
/* If the value of a SEND for an ICALL changes, we need to reconsider the
10561062
* ICALL result value. Otherwise we can ignore the opcode. */
10571063
zend_call_info *call;
@@ -1065,12 +1071,6 @@ static void sccp_visit_instr(scdf_ctx *scdf, zend_op *opline, zend_ssa_op *ssa_o
10651071
return;
10661072
}
10671073

1068-
if (opline->opcode == ZEND_SEND_VAR) {
1069-
/* TODO ? */
1070-
/* Can be UNDEF or a value copy */
1071-
SET_RESULT_BOT(op1);
1072-
}
1073-
10741074
opline = call->caller_call_opline;
10751075
ssa_op = &ctx->scdf.ssa->ops[opline - ctx->scdf.op_array->opcodes];
10761076
break;

0 commit comments

Comments
 (0)