@@ -12429,16 +12429,14 @@ static int zend_jit_fetch_dim(zend_jit_ctx *jit,
12429
12429
uint32_t op1_info,
12430
12430
zend_jit_addr op1_addr,
12431
12431
uint32_t op2_info,
12432
+ zend_jit_addr op2_addr,
12432
12433
zend_jit_addr res_addr,
12433
12434
uint8_t dim_type)
12434
12435
{
12435
- zend_jit_addr op2_addr;
12436
12436
int may_throw = 0;
12437
12437
ir_ref end_inputs = IR_UNUSED;
12438
12438
ir_ref ref, if_type = IR_UNUSED, ht_ref;
12439
12439
12440
- op2_addr = (opline->op2_type != IS_UNUSED) ? OP2_ADDR() : 0;
12441
-
12442
12440
if (opline->opcode == ZEND_FETCH_DIM_RW) {
12443
12441
jit_SET_EX_OPLINE(jit, opline);
12444
12442
}
@@ -12496,7 +12494,7 @@ static int zend_jit_fetch_dim(zend_jit_ctx *jit,
12496
12494
may_throw = 1;
12497
12495
}
12498
12496
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,
12500
12498
0, ht_ref, found_inputs, found_vals, &end_inputs, NULL)) {
12501
12499
return 0;
12502
12500
}
@@ -16572,11 +16570,15 @@ static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa
16572
16570
(((op2_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_LONG) ||
16573
16571
((op2_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_STRING));
16574
16572
case ZEND_ASSIGN_DIM:
16573
+ case ZEND_FETCH_DIM_W:
16574
+ case ZEND_FETCH_DIM_RW:
16575
+ case ZEND_FETCH_LIST_W:
16575
16576
op1_info = OP1_INFO();
16576
16577
op2_info = OP2_INFO();
16577
16578
if (trace) {
16578
16579
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
16580
16582
&& (opline+1)->op1.var == opline->op1.var) {
16581
16583
/* skip $a[x] = $a; */
16582
16584
return 0;
@@ -16592,6 +16594,10 @@ static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa
16592
16594
&& (trace->op1_type & ~(IS_TRACE_REFERENCE|IS_TRACE_INDIRECT|IS_TRACE_PACKED)) == IS_ARRAY) {
16593
16595
op1_info &= ~((MAY_BE_ANY|MAY_BE_UNDEF) - MAY_BE_ARRAY);
16594
16596
}
16597
+ } else {
16598
+ if (opline->op1_type != IS_CV) {
16599
+ return 0;
16600
+ }
16595
16601
}
16596
16602
return ((op1_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_ARRAY) &&
16597
16603
(((op2_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_LONG) ||
0 commit comments