@@ -12726,7 +12726,7 @@ static int zend_jit_fetch_dim_read(zend_jit_ctx *jit,
1272612726
1272712727static zend_jit_addr zend_jit_prepare_array_update(zend_jit_ctx *jit,
1272812728 const zend_op *opline,
12729- uint32_t op1_info ,
12729+ uint32_t *op1_info_ptr ,
1273012730 zend_jit_addr op1_addr,
1273112731 ir_ref *if_type,
1273212732 ir_ref *ht_ref,
@@ -12735,6 +12735,7 @@ static zend_jit_addr zend_jit_prepare_array_update(zend_jit_ctx *jit,
1273512735 ir_ref ref = IR_UNUSED;
1273612736 ir_ref array_reference_end = IR_UNUSED, array_reference_ref = IR_UNUSED;
1273712737 ir_refs *array_inputs, *array_values;
12738+ uint32_t op1_info = *op1_info_ptr;
1273812739
1273912740 ir_refs_init(array_inputs, 4);
1274012741 ir_refs_init(array_values, 4);
@@ -12826,6 +12827,9 @@ static zend_jit_addr zend_jit_prepare_array_update(zend_jit_ctx *jit,
1282612827 ir_refs_add(array_inputs, ir_END());
1282712828 ir_refs_add(array_values, ref);
1282812829 }
12830+ op1_info &= ~(MAY_BE_UNDEF | MAY_BE_NULL);
12831+ op1_info |= MAY_BE_ARRAY | MAY_BE_RC1;
12832+ *op1_info_ptr = op1_info;
1282912833 }
1283012834
1283112835 if (array_inputs->count) {
@@ -12855,9 +12859,9 @@ static int zend_jit_fetch_dim(zend_jit_ctx *jit,
1285512859 jit_SET_EX_OPLINE(jit, opline);
1285612860 }
1285712861
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);
1285912863
12860- if (op1_info & (MAY_BE_UNDEF|MAY_BE_NULL| MAY_BE_ARRAY) ) {
12864+ if (op1_info & MAY_BE_ARRAY) {
1286112865 ir_refs *found_inputs, *found_vals;
1286212866
1286312867 ir_refs_init(found_inputs, 8);
@@ -12937,7 +12941,7 @@ static int zend_jit_fetch_dim(zend_jit_ctx *jit,
1293712941 }
1293812942 }
1293912943
12940- if (op1_info & (MAY_BE_ANY-(MAY_BE_NULL| MAY_BE_ARRAY) )) {
12944+ if (op1_info & (MAY_BE_ANY-MAY_BE_ARRAY)) {
1294112945 ir_ref arg2;
1294212946
1294312947 may_throw = 1;
@@ -13247,9 +13251,9 @@ static int zend_jit_assign_dim(zend_jit_ctx *jit,
1324713251 val_info &= ~MAY_BE_UNDEF;
1324813252 }
1324913253
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);
1325113255
13252- if (op1_info & (MAY_BE_UNDEF|MAY_BE_NULL| MAY_BE_ARRAY) ) {
13256+ if (op1_info & MAY_BE_ARRAY) {
1325313257 if (opline->op2_type == IS_UNUSED) {
1325413258 uint32_t var_info = MAY_BE_NULL;
1325513259 ir_ref if_ok, ref;
@@ -13320,7 +13324,7 @@ static int zend_jit_assign_dim(zend_jit_ctx *jit,
1332013324 ir_END_list(end_inputs);
1332113325 }
1332213326
13323- if (op1_info & (MAY_BE_ANY-(MAY_BE_NULL| MAY_BE_ARRAY) )) {
13327+ if (op1_info & (MAY_BE_ANY-MAY_BE_ARRAY)) {
1332413328 ir_ref arg2, arg4;
1332513329
1332613330 if (if_type) {
@@ -13411,9 +13415,9 @@ static int zend_jit_assign_dim_op(zend_jit_ctx *jit,
1341113415 jit_SET_EX_OPLINE(jit, opline);
1341213416 }
1341313417
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);
1341513419
13416- if (op1_info & (MAY_BE_UNDEF|MAY_BE_NULL| MAY_BE_ARRAY) ) {
13420+ if (op1_info & MAY_BE_ARRAY) {
1341713421 uint32_t var_def_info = zend_array_element_type(op1_def_info, opline->op1_type, 1, 0);
1341813422
1341913423 if (opline->op2_type == IS_UNUSED) {
@@ -13555,7 +13559,7 @@ static int zend_jit_assign_dim_op(zend_jit_ctx *jit,
1355513559 }
1355613560 }
1355713561
13558- if (op1_info & (MAY_BE_ANY-(MAY_BE_NULL| MAY_BE_ARRAY) )) {
13562+ if (op1_info & (MAY_BE_ANY-MAY_BE_ARRAY)) {
1355913563 binary_op_type binary_op;
1356013564 ir_ref arg2;
1356113565
0 commit comments