File tree Expand file tree Collapse file tree 2 files changed +32
-6
lines changed Expand file tree Collapse file tree 2 files changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -12505,6 +12505,7 @@ static int zend_jit_incdec_obj(dasm_State **Dst,
12505
12505
bool needs_slow_path = 0;
12506
12506
bool use_prop_guard = 0;
12507
12507
bool may_throw = 0;
12508
+ uint32_t res_info = (opline->result_type != IS_UNDEF) ? RES_INFO() : 0;
12508
12509
12509
12510
ZEND_ASSERT(opline->op2_type == IS_CONST);
12510
12511
ZEND_ASSERT(op1_info & MAY_BE_OBJECT);
@@ -12820,9 +12821,21 @@ static int zend_jit_incdec_obj(dasm_State **Dst,
12820
12821
| SET_ZVAL_TYPE_INFO res_addr, IS_DOUBLE, TMP1w, TMP2
12821
12822
}
12822
12823
}
12823
- | b >4
12824
- |.code
12825
- |4:
12824
+ if (opline->result_type != IS_UNUSED
12825
+ && (opline->opcode == ZEND_PRE_INC_OBJ || opline->opcode == ZEND_PRE_DEC_OBJ)
12826
+ && (res_info & MAY_BE_GUARD)
12827
+ && (res_info & MAY_BE_LONG)) {
12828
+ int32_t exit_point = zend_jit_trace_get_exit_point(opline + 1, 0);
12829
+ const void *exit_addr = zend_jit_trace_get_exit_addr(exit_point);
12830
+
12831
+ ssa->var_info[ssa_op->result_def].type = res_info & ~MAY_BE_GUARD;
12832
+ | b &exit_addr
12833
+ |.code
12834
+ } else {
12835
+ | b >4
12836
+ |.code
12837
+ |4:
12838
+ }
12826
12839
}
12827
12840
}
12828
12841
Original file line number Diff line number Diff line change @@ -13209,6 +13209,7 @@ static int zend_jit_incdec_obj(dasm_State **Dst,
13209
13209
bool needs_slow_path = 0;
13210
13210
bool use_prop_guard = 0;
13211
13211
bool may_throw = 0;
13212
+ uint32_t res_info = (opline->result_type != IS_UNDEF) ? RES_INFO() : 0;
13212
13213
13213
13214
ZEND_ASSERT(opline->op2_type == IS_CONST);
13214
13215
ZEND_ASSERT(op1_info & MAY_BE_OBJECT);
@@ -13546,9 +13547,21 @@ static int zend_jit_incdec_obj(dasm_State **Dst,
13546
13547
}
13547
13548
|.endif
13548
13549
}
13549
- | jmp >4
13550
- |.code
13551
- |4:
13550
+ if (opline->result_type != IS_UNUSED
13551
+ && (opline->opcode == ZEND_PRE_INC_OBJ || opline->opcode == ZEND_PRE_DEC_OBJ)
13552
+ && (res_info & MAY_BE_GUARD)
13553
+ && (res_info & MAY_BE_LONG)) {
13554
+ int32_t exit_point = zend_jit_trace_get_exit_point(opline + 1, 0);
13555
+ const void *exit_addr = zend_jit_trace_get_exit_addr(exit_point);
13556
+
13557
+ ssa->var_info[ssa_op->result_def].type = res_info & ~MAY_BE_GUARD;
13558
+ | jmp &exit_addr
13559
+ |.code
13560
+ } else {
13561
+ | jmp >4
13562
+ |.code
13563
+ |4:
13564
+ }
13552
13565
}
13553
13566
}
13554
13567
You can’t perform that action at this time.
0 commit comments