@@ -11399,9 +11399,6 @@ static int zend_jit_fetch_dimension_address_inner(zend_jit_ctx *jit,
11399
11399
packed_loaded = 1;
11400
11400
} else {
11401
11401
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
- }
11405
11402
}
11406
11403
h = ir_CONST_LONG(val);
11407
11404
} else {
@@ -11511,9 +11508,18 @@ static int zend_jit_fetch_dimension_address_inner(zend_jit_ctx *jit,
11511
11508
ir_refs_add(found_inputs, ir_END());
11512
11509
ir_refs_add(found_vals, ref);
11513
11510
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
+ }
11514
11520
} else if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE && type == BP_VAR_R) {
11515
11521
/* 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) {
11517
11523
ir_GUARD(type_ref, ir_CONST_ADDR(exit_addr));
11518
11524
}
11519
11525
} 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,
11530
11536
ir_IF_TRUE(if_def);
11531
11537
}
11532
11538
}
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) {
11545
11540
if (if_packed) {
11546
11541
ir_IF_FALSE(if_packed);
11547
11542
if_packed = IR_UNUSED;
@@ -11575,6 +11570,16 @@ static int zend_jit_fetch_dimension_address_inner(zend_jit_ctx *jit,
11575
11570
} else if (packed_loaded) {
11576
11571
ir_refs_add(found_inputs, ir_END());
11577
11572
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
+ }
11578
11583
}
11579
11584
11580
11585
if (idx_not_found_inputs) {
0 commit comments