@@ -11366,6 +11366,7 @@ static int zend_jit_fetch_dimension_address_inner(zend_jit_ctx *jit,
11366
11366
uint32_t type,
11367
11367
uint32_t op1_info,
11368
11368
uint32_t op2_info,
11369
+ zend_jit_addr op2_addr,
11369
11370
uint8_t dim_type,
11370
11371
const void *found_exit_addr,
11371
11372
const void *not_found_exit_addr,
@@ -11377,7 +11378,6 @@ static int zend_jit_fetch_dimension_address_inner(zend_jit_ctx *jit,
11377
11378
ir_ref *end_inputs,
11378
11379
ir_ref *not_found_inputs)
11379
11380
{
11380
- zend_jit_addr op2_addr = OP2_ADDR();
11381
11381
zend_jit_addr res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var);
11382
11382
ir_ref ref = IR_UNUSED, cond, if_found;
11383
11383
ir_ref if_type = IS_UNUSED;
@@ -11965,11 +11965,12 @@ static int zend_jit_fetch_dim_read(zend_jit_ctx *jit,
11965
11965
zend_jit_addr op1_addr,
11966
11966
bool op1_avoid_refcounting,
11967
11967
uint32_t op2_info,
11968
+ zend_jit_addr op2_addr,
11968
11969
uint32_t res_info,
11969
11970
zend_jit_addr res_addr,
11970
11971
uint8_t dim_type)
11971
11972
{
11972
- zend_jit_addr orig_op1_addr, op2_addr ;
11973
+ zend_jit_addr orig_op1_addr;
11973
11974
const void *exit_addr = NULL;
11974
11975
const void *not_found_exit_addr = NULL;
11975
11976
bool result_type_guard = 0;
@@ -11981,7 +11982,6 @@ static int zend_jit_fetch_dim_read(zend_jit_ctx *jit,
11981
11982
ir_ref not_found_inputs = IR_UNUSED;
11982
11983
11983
11984
orig_op1_addr = OP1_ADDR();
11984
- op2_addr = OP2_ADDR();
11985
11985
11986
11986
if (opline->opcode != ZEND_FETCH_DIM_IS
11987
11987
&& JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE
@@ -12086,7 +12086,7 @@ static int zend_jit_fetch_dim_read(zend_jit_ctx *jit,
12086
12086
12087
12087
if (!zend_jit_fetch_dimension_address_inner(jit, opline,
12088
12088
(opline->opcode != ZEND_FETCH_DIM_IS) ? BP_VAR_R : BP_VAR_IS,
12089
- op1_info, op2_info, dim_type, NULL, not_found_exit_addr, exit_addr,
12089
+ op1_info, op2_info, op2_addr, dim_type, NULL, not_found_exit_addr, exit_addr,
12090
12090
result_type_guard, ht_ref, found_inputs, found_vals,
12091
12091
&end_inputs, ¬_found_inputs)) {
12092
12092
return 0;
@@ -12489,7 +12489,8 @@ static int zend_jit_fetch_dim(zend_jit_ctx *jit,
12489
12489
if (op2_info & ((MAY_BE_ANY|MAY_BE_UNDEF) - (MAY_BE_LONG|MAY_BE_STRING))) {
12490
12490
may_throw = 1;
12491
12491
}
12492
- if (!zend_jit_fetch_dimension_address_inner(jit, opline, type, op1_info, op2_info, dim_type, NULL, NULL, NULL,
12492
+ if (!zend_jit_fetch_dimension_address_inner(jit, opline, type, op1_info,
12493
+ op2_info, OP2_ADDR(), dim_type, NULL, NULL, NULL,
12493
12494
0, ht_ref, found_inputs, found_vals, &end_inputs, NULL)) {
12494
12495
return 0;
12495
12496
}
@@ -12648,7 +12649,8 @@ static int zend_jit_isset_isempty_dim(zend_jit_ctx *jit,
12648
12649
not_found_exit_addr = exit_addr;
12649
12650
}
12650
12651
}
12651
- if (!zend_jit_fetch_dimension_address_inner(jit, opline, BP_JIT_IS, op1_info, op2_info, dim_type, found_exit_addr, not_found_exit_addr, NULL,
12652
+ if (!zend_jit_fetch_dimension_address_inner(jit, opline, BP_JIT_IS, op1_info,
12653
+ op2_info, OP2_ADDR(), dim_type, found_exit_addr, not_found_exit_addr, NULL,
12652
12654
0, ht_ref, true_inputs, NULL, &false_inputs, NULL)) {
12653
12655
return 0;
12654
12656
}
@@ -12849,7 +12851,8 @@ static int zend_jit_assign_dim(zend_jit_ctx *jit, const zend_op *opline, uint32_
12849
12851
ir_refs_init(found_inputs, 8);
12850
12852
ir_refs_init(found_values, 8);
12851
12853
12852
- if (!zend_jit_fetch_dimension_address_inner(jit, opline, BP_VAR_W, op1_info, op2_info, dim_type, NULL, NULL, NULL,
12854
+ if (!zend_jit_fetch_dimension_address_inner(jit, opline, BP_VAR_W, op1_info,
12855
+ op2_info, OP2_ADDR(), dim_type, NULL, NULL, NULL,
12853
12856
0, ht_ref, found_inputs, found_values, &end_inputs, NULL)) {
12854
12857
return 0;
12855
12858
}
@@ -13009,7 +13012,8 @@ static int zend_jit_assign_dim_op(zend_jit_ctx *jit, const zend_op *opline, uint
13009
13012
}
13010
13013
}
13011
13014
13012
- if (!zend_jit_fetch_dimension_address_inner(jit, opline, BP_VAR_RW, op1_info, op2_info, dim_type, NULL, not_found_exit_addr, NULL,
13015
+ if (!zend_jit_fetch_dimension_address_inner(jit, opline, BP_VAR_RW, op1_info,
13016
+ op2_info, OP2_ADDR(), dim_type, NULL, not_found_exit_addr, NULL,
13013
13017
0, ht_ref, found_inputs, found_values, &end_inputs, NULL)) {
13014
13018
return 0;
13015
13019
}
@@ -16536,6 +16540,8 @@ static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa
16536
16540
case ZEND_FETCH_CONSTANT:
16537
16541
return 1;
16538
16542
case ZEND_FETCH_DIM_R:
16543
+ case ZEND_FETCH_DIM_IS:
16544
+ case ZEND_FETCH_LIST_R:
16539
16545
op1_info = OP1_INFO();
16540
16546
op2_info = OP2_INFO();
16541
16547
if (trace
@@ -16544,10 +16550,8 @@ static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa
16544
16550
op1_info &= ~((MAY_BE_ANY|MAY_BE_UNDEF) - MAY_BE_ARRAY);
16545
16551
}
16546
16552
return ((op1_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_ARRAY) &&
16547
- (!(opline->op1_type & (IS_TMP_VAR|IS_VAR)) || !(op1_info & MAY_BE_RC1)) &&
16548
16553
(((op2_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_LONG) ||
16549
- (((op2_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_STRING) &&
16550
- (!(opline->op2_type & (IS_TMP_VAR|IS_VAR)) || !(op2_info & MAY_BE_RC1))));
16554
+ ((op2_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_STRING));
16551
16555
}
16552
16556
return 0;
16553
16557
}
0 commit comments