Skip to content

Commit 2e02b1f

Browse files
committed
JIT: Call zend_hash_index_find() instead of _zend_hash_index_find() if we didn't check for packed array before
1 parent 325865d commit 2e02b1f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5466,7 +5466,11 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o
54665466
| // hval = Z_LVAL_P(dim);
54675467
| GET_ZVAL_LVAL ZREG_FCARG2a, op2_addr
54685468
}
5469-
| EXT_CALL _zend_hash_index_find, r0
5469+
if (packed_loaded) {
5470+
| EXT_CALL _zend_hash_index_find, r0
5471+
} else {
5472+
| EXT_CALL zend_hash_index_find, r0
5473+
}
54705474
| test r0, r0
54715475
if (not_found_exit_addr) {
54725476
| jz &not_found_exit_addr
@@ -5522,7 +5526,11 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o
55225526
| // hval = Z_LVAL_P(dim);
55235527
| GET_ZVAL_LVAL ZREG_FCARG2a, op2_addr
55245528
}
5525-
| EXT_CALL _zend_hash_index_find, r0
5529+
if (packed_loaded) {
5530+
| EXT_CALL _zend_hash_index_find, r0
5531+
} else {
5532+
| EXT_CALL zend_hash_index_find, r0
5533+
}
55265534
| test r0, r0
55275535
if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE && type == BP_VAR_R) {
55285536
| jz &exit_addr

0 commit comments

Comments
 (0)