@@ -12429,16 +12429,14 @@ static int zend_jit_fetch_dim(zend_jit_ctx *jit,
1242912429 uint32_t op1_info,
1243012430 zend_jit_addr op1_addr,
1243112431 uint32_t op2_info,
12432+ zend_jit_addr op2_addr,
1243212433 zend_jit_addr res_addr,
1243312434 uint8_t dim_type)
1243412435{
12435- zend_jit_addr op2_addr;
1243612436 int may_throw = 0;
1243712437 ir_ref end_inputs = IR_UNUSED;
1243812438 ir_ref ref, if_type = IR_UNUSED, ht_ref;
1243912439
12440- op2_addr = (opline->op2_type != IS_UNUSED) ? OP2_ADDR() : 0;
12441-
1244212440 if (opline->opcode == ZEND_FETCH_DIM_RW) {
1244312441 jit_SET_EX_OPLINE(jit, opline);
1244412442 }
@@ -12496,7 +12494,7 @@ static int zend_jit_fetch_dim(zend_jit_ctx *jit,
1249612494 may_throw = 1;
1249712495 }
1249812496 if (!zend_jit_fetch_dimension_address_inner(jit, opline, type, op1_info,
12499- op2_info, OP2_ADDR() , dim_type, NULL, NULL, NULL,
12497+ op2_info, op2_addr , dim_type, NULL, NULL, NULL,
1250012498 0, ht_ref, found_inputs, found_vals, &end_inputs, NULL)) {
1250112499 return 0;
1250212500 }
@@ -16572,11 +16570,15 @@ static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa
1657216570 (((op2_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_LONG) ||
1657316571 ((op2_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_STRING));
1657416572 case ZEND_ASSIGN_DIM:
16573+ case ZEND_FETCH_DIM_W:
16574+ case ZEND_FETCH_DIM_RW:
16575+ case ZEND_FETCH_LIST_W:
1657516576 op1_info = OP1_INFO();
1657616577 op2_info = OP2_INFO();
1657716578 if (trace) {
1657816579 if (opline->op1_type == IS_CV) {
16579- if ((opline+1)->op1_type == IS_CV
16580+ if (opline->opcode == ZEND_ASSIGN_DIM
16581+ && (opline+1)->op1_type == IS_CV
1658016582 && (opline+1)->op1.var == opline->op1.var) {
1658116583 /* skip $a[x] = $a; */
1658216584 return 0;
@@ -16592,6 +16594,10 @@ static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa
1659216594 && (trace->op1_type & ~(IS_TRACE_REFERENCE|IS_TRACE_INDIRECT|IS_TRACE_PACKED)) == IS_ARRAY) {
1659316595 op1_info &= ~((MAY_BE_ANY|MAY_BE_UNDEF) - MAY_BE_ARRAY);
1659416596 }
16597+ } else {
16598+ if (opline->op1_type != IS_CV) {
16599+ return 0;
16600+ }
1659516601 }
1659616602 return ((op1_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_ARRAY) &&
1659716603 (((op2_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_LONG) ||
0 commit comments