Skip to content

Commit 217f6e1

Browse files
committed
Use cheaper variant of zend_hash_index_find()
1 parent 08858e7 commit 217f6e1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/opcache/jit/zend_jit_helpers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static zval* ZEND_FASTCALL zend_jit_symtable_find(HashTable *ht, zend_string *st
126126

127127
static zval* ZEND_FASTCALL zend_jit_hash_index_lookup_rw(HashTable *ht, zend_long idx)
128128
{
129-
zval *retval = zend_hash_index_find(ht, idx);
129+
zval *retval = _zend_hash_index_find(ht, idx);
130130

131131
if (!retval) {
132132
zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, idx);
@@ -137,7 +137,7 @@ static zval* ZEND_FASTCALL zend_jit_hash_index_lookup_rw(HashTable *ht, zend_lon
137137

138138
static zval* ZEND_FASTCALL zend_jit_hash_index_lookup_w(HashTable *ht, zend_long idx)
139139
{
140-
zval *retval = zend_hash_index_find(ht, idx);
140+
zval *retval = _zend_hash_index_find(ht, idx);
141141

142142
if (!retval) {
143143
retval = zend_hash_index_add_new(ht, idx, &EG(uninitialized_zval));

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4822,7 +4822,7 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o
48224822
if (op1_info & MAY_BE_ARRAY_KEY_LONG) {
48234823
|4:
48244824
}
4825-
| EXT_CALL zend_hash_index_find, r0
4825+
| EXT_CALL _zend_hash_index_find, r0
48264826
| test r0, r0
48274827
| jz >9 // NOT_FOUND
48284828
if (op2_info & MAY_BE_STRING) {
@@ -4849,7 +4849,7 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o
48494849
}
48504850
|4:
48514851
}
4852-
| EXT_CALL zend_hash_index_find, r0
4852+
| EXT_CALL _zend_hash_index_find, r0
48534853
| test r0, r0
48544854
if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE && type == BP_VAR_R) {
48554855
| jz &exit_addr

0 commit comments

Comments
 (0)