@@ -12726,7 +12726,7 @@ static int zend_jit_fetch_dim_read(zend_jit_ctx *jit,
12726
12726
12727
12727
static zend_jit_addr zend_jit_prepare_array_update(zend_jit_ctx *jit,
12728
12728
const zend_op *opline,
12729
- uint32_t op1_info ,
12729
+ uint32_t *op1_info_ptr ,
12730
12730
zend_jit_addr op1_addr,
12731
12731
ir_ref *if_type,
12732
12732
ir_ref *ht_ref,
@@ -12735,6 +12735,7 @@ static zend_jit_addr zend_jit_prepare_array_update(zend_jit_ctx *jit,
12735
12735
ir_ref ref = IR_UNUSED;
12736
12736
ir_ref array_reference_end = IR_UNUSED, array_reference_ref = IR_UNUSED;
12737
12737
ir_refs *array_inputs, *array_values;
12738
+ uint32_t op1_info = *op1_info_ptr;
12738
12739
12739
12740
ir_refs_init(array_inputs, 4);
12740
12741
ir_refs_init(array_values, 4);
@@ -12826,6 +12827,9 @@ static zend_jit_addr zend_jit_prepare_array_update(zend_jit_ctx *jit,
12826
12827
ir_refs_add(array_inputs, ir_END());
12827
12828
ir_refs_add(array_values, ref);
12828
12829
}
12830
+ op1_info &= ~(MAY_BE_UNDEF | MAY_BE_NULL);
12831
+ op1_info |= MAY_BE_ARRAY | MAY_BE_RC1;
12832
+ *op1_info_ptr = op1_info;
12829
12833
}
12830
12834
12831
12835
if (array_inputs->count) {
@@ -12855,9 +12859,9 @@ static int zend_jit_fetch_dim(zend_jit_ctx *jit,
12855
12859
jit_SET_EX_OPLINE(jit, opline);
12856
12860
}
12857
12861
12858
- op1_addr = zend_jit_prepare_array_update(jit, opline, op1_info, op1_addr, &if_type, &ht_ref, &may_throw);
12862
+ op1_addr = zend_jit_prepare_array_update(jit, opline, & op1_info, op1_addr, &if_type, &ht_ref, &may_throw);
12859
12863
12860
- if (op1_info & (MAY_BE_UNDEF|MAY_BE_NULL| MAY_BE_ARRAY) ) {
12864
+ if (op1_info & MAY_BE_ARRAY) {
12861
12865
ir_refs *found_inputs, *found_vals;
12862
12866
12863
12867
ir_refs_init(found_inputs, 8);
@@ -12937,7 +12941,7 @@ static int zend_jit_fetch_dim(zend_jit_ctx *jit,
12937
12941
}
12938
12942
}
12939
12943
12940
- if (op1_info & (MAY_BE_ANY-(MAY_BE_NULL| MAY_BE_ARRAY) )) {
12944
+ if (op1_info & (MAY_BE_ANY-MAY_BE_ARRAY)) {
12941
12945
ir_ref arg2;
12942
12946
12943
12947
may_throw = 1;
@@ -13247,9 +13251,9 @@ static int zend_jit_assign_dim(zend_jit_ctx *jit,
13247
13251
val_info &= ~MAY_BE_UNDEF;
13248
13252
}
13249
13253
13250
- op1_addr = zend_jit_prepare_array_update(jit, opline, op1_info, op1_addr, &if_type, &ht_ref, &may_throw);
13254
+ op1_addr = zend_jit_prepare_array_update(jit, opline, & op1_info, op1_addr, &if_type, &ht_ref, &may_throw);
13251
13255
13252
- if (op1_info & (MAY_BE_UNDEF|MAY_BE_NULL| MAY_BE_ARRAY) ) {
13256
+ if (op1_info & MAY_BE_ARRAY) {
13253
13257
if (opline->op2_type == IS_UNUSED) {
13254
13258
uint32_t var_info = MAY_BE_NULL;
13255
13259
ir_ref if_ok, ref;
@@ -13320,7 +13324,7 @@ static int zend_jit_assign_dim(zend_jit_ctx *jit,
13320
13324
ir_END_list(end_inputs);
13321
13325
}
13322
13326
13323
- if (op1_info & (MAY_BE_ANY-(MAY_BE_NULL| MAY_BE_ARRAY) )) {
13327
+ if (op1_info & (MAY_BE_ANY-MAY_BE_ARRAY)) {
13324
13328
ir_ref arg2, arg4;
13325
13329
13326
13330
if (if_type) {
@@ -13411,9 +13415,9 @@ static int zend_jit_assign_dim_op(zend_jit_ctx *jit,
13411
13415
jit_SET_EX_OPLINE(jit, opline);
13412
13416
}
13413
13417
13414
- op1_addr = zend_jit_prepare_array_update(jit, opline, op1_info, op1_addr, &if_type, &ht_ref, &may_throw);
13418
+ op1_addr = zend_jit_prepare_array_update(jit, opline, & op1_info, op1_addr, &if_type, &ht_ref, &may_throw);
13415
13419
13416
- if (op1_info & (MAY_BE_UNDEF|MAY_BE_NULL| MAY_BE_ARRAY) ) {
13420
+ if (op1_info & MAY_BE_ARRAY) {
13417
13421
uint32_t var_def_info = zend_array_element_type(op1_def_info, opline->op1_type, 1, 0);
13418
13422
13419
13423
if (opline->op2_type == IS_UNUSED) {
@@ -13555,7 +13559,7 @@ static int zend_jit_assign_dim_op(zend_jit_ctx *jit,
13555
13559
}
13556
13560
}
13557
13561
13558
- if (op1_info & (MAY_BE_ANY-(MAY_BE_NULL| MAY_BE_ARRAY) )) {
13562
+ if (op1_info & (MAY_BE_ANY-MAY_BE_ARRAY)) {
13559
13563
binary_op_type binary_op;
13560
13564
ir_ref arg2;
13561
13565
0 commit comments