From: Dmitry Stogov Date: Wed, 10 Jun 2020 22:34:55 +0000 (+0300) Subject: Use cheaper variant of zend_hash_index_find() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=217f6e16d625abd9ce2ae1ae92421f77945649df;p=php Use cheaper variant of zend_hash_index_find() --- diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 7cc1e59322..5801fa6774 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -126,7 +126,7 @@ static zval* ZEND_FASTCALL zend_jit_symtable_find(HashTable *ht, zend_string *st static zval* ZEND_FASTCALL zend_jit_hash_index_lookup_rw(HashTable *ht, zend_long idx) { - zval *retval = zend_hash_index_find(ht, idx); + zval *retval = _zend_hash_index_find(ht, idx); if (!retval) { 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 static zval* ZEND_FASTCALL zend_jit_hash_index_lookup_w(HashTable *ht, zend_long idx) { - zval *retval = zend_hash_index_find(ht, idx); + zval *retval = _zend_hash_index_find(ht, idx); if (!retval) { retval = zend_hash_index_add_new(ht, idx, &EG(uninitialized_zval)); diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 39c99c2776..39bf3578c1 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -4822,7 +4822,7 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o if (op1_info & MAY_BE_ARRAY_KEY_LONG) { |4: } - | EXT_CALL zend_hash_index_find, r0 + | EXT_CALL _zend_hash_index_find, r0 | test r0, r0 | jz >9 // NOT_FOUND if (op2_info & MAY_BE_STRING) { @@ -4849,7 +4849,7 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o } |4: } - | EXT_CALL zend_hash_index_find, r0 + | EXT_CALL _zend_hash_index_find, r0 | test r0, r0 if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE && type == BP_VAR_R) { | jz &exit_addr