@@ -11399,9 +11399,6 @@ static int zend_jit_fetch_dimension_address_inner(zend_jit_ctx *jit,
1139911399 packed_loaded = 1;
1140011400 } else {
1140111401 bad_packed_key = 1;
11402- if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE && type == BP_VAR_R) {
11403- jit_SIDE_EXIT(jit, ir_CONST_ADDR(exit_addr));
11404- }
1140511402 }
1140611403 h = ir_CONST_LONG(val);
1140711404 } else {
@@ -11511,9 +11508,18 @@ static int zend_jit_fetch_dimension_address_inner(zend_jit_ctx *jit,
1151111508 ir_refs_add(found_inputs, ir_END());
1151211509 ir_refs_add(found_vals, ref);
1151311510 ir_IF_FALSE(if_def);
11511+ if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE && type == BP_VAR_R) {
11512+ jit_SIDE_EXIT(jit, ir_CONST_ADDR(exit_addr));
11513+ } else if (type == BP_VAR_IS && not_found_exit_addr) {
11514+ jit_SIDE_EXIT(jit, ir_CONST_ADDR(not_found_exit_addr));
11515+ } else if (type == BP_VAR_IS && result_type_guard) {
11516+ ir_END_list(*not_found_inputs);
11517+ } else {
11518+ ir_END_list(idx_not_found_inputs);
11519+ }
1151411520 } else if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE && type == BP_VAR_R) {
1151511521 /* perform IS_UNDEF check only after result type guard (during deoptimization) */
11516- if (!result_type_guard || (op1_info & MAY_BE_ARRAY_NUMERIC_HASH) ) {
11522+ if (!result_type_guard) {
1151711523 ir_GUARD(type_ref, ir_CONST_ADDR(exit_addr));
1151811524 }
1151911525 } else if (type == BP_VAR_IS && not_found_exit_addr) {
@@ -11530,18 +11536,7 @@ static int zend_jit_fetch_dimension_address_inner(zend_jit_ctx *jit,
1153011536 ir_IF_TRUE(if_def);
1153111537 }
1153211538 }
11533- if (!(op1_info & MAY_BE_ARRAY_KEY_LONG) || (packed_loaded && (op1_info & MAY_BE_ARRAY_NUMERIC_HASH))) {
11534- if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE && type == BP_VAR_R) {
11535- jit_SIDE_EXIT(jit, ir_CONST_ADDR(exit_addr));
11536- } else if (type == BP_VAR_IS && not_found_exit_addr) {
11537- jit_SIDE_EXIT(jit, ir_CONST_ADDR(not_found_exit_addr));
11538- } else if (type == BP_VAR_IS && result_type_guard) {
11539- ir_END_list(*not_found_inputs);
11540- } else {
11541- ir_END_list(idx_not_found_inputs);
11542- }
11543- }
11544- if (/*!packed_loaded ||*/ (op1_info & MAY_BE_ARRAY_NUMERIC_HASH)) {
11539+ if (op1_info & MAY_BE_ARRAY_NUMERIC_HASH) {
1154511540 if (if_packed) {
1154611541 ir_IF_FALSE(if_packed);
1154711542 if_packed = IR_UNUSED;
@@ -11575,6 +11570,16 @@ static int zend_jit_fetch_dimension_address_inner(zend_jit_ctx *jit,
1157511570 } else if (packed_loaded) {
1157611571 ir_refs_add(found_inputs, ir_END());
1157711572 ir_refs_add(found_vals, ref);
11573+ } else {
11574+ if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE && type == BP_VAR_R) {
11575+ jit_SIDE_EXIT(jit, ir_CONST_ADDR(exit_addr));
11576+ } else if (type == BP_VAR_IS && not_found_exit_addr) {
11577+ jit_SIDE_EXIT(jit, ir_CONST_ADDR(not_found_exit_addr));
11578+ } else if (type == BP_VAR_IS && result_type_guard) {
11579+ ir_END_list(*not_found_inputs);
11580+ } else {
11581+ ir_END_list(idx_not_found_inputs);
11582+ }
1157811583 }
1157911584
1158011585 if (idx_not_found_inputs) {
0 commit comments