@@ -259,16 +259,6 @@ static zval* ZEND_FASTCALL zend_jit_hash_index_lookup_rw(HashTable *ht, zend_lon
259259 return retval ;
260260}
261261
262- static zval * ZEND_FASTCALL zend_jit_hash_index_lookup_w (HashTable * ht , zend_long idx )
263- {
264- zval * retval = _zend_hash_index_find (ht , idx );
265-
266- if (!retval ) {
267- retval = zend_hash_index_add_new (ht , idx , & EG (uninitialized_zval ));
268- }
269- return retval ;
270- }
271-
272262static zval * ZEND_FASTCALL zend_jit_hash_lookup_rw (HashTable * ht , zend_string * str )
273263{
274264 zval * retval = zend_hash_find_ex (ht , str , 1 );
@@ -285,15 +275,6 @@ static zval* ZEND_FASTCALL zend_jit_hash_lookup_rw(HashTable *ht, zend_string *s
285275 return retval ;
286276}
287277
288- static zval * ZEND_FASTCALL zend_jit_hash_lookup_w (HashTable * ht , zend_string * str )
289- {
290- zval * retval = zend_hash_find_ex (ht , str , 1 );
291- if (!retval ) {
292- retval = zend_hash_add_new (ht , str , & EG (uninitialized_zval ));
293- }
294- return retval ;
295- }
296-
297278static zval * ZEND_FASTCALL zend_jit_symtable_lookup_rw (HashTable * ht , zend_string * str )
298279{
299280 zend_ulong idx ;
@@ -342,7 +323,6 @@ static zval* ZEND_FASTCALL zend_jit_symtable_lookup_w(HashTable *ht, zend_string
342323{
343324 zend_ulong idx ;
344325 register const char * tmp = str -> val ;
345- zval * retval ;
346326
347327 do {
348328 if (* tmp > '9' ) {
@@ -357,19 +337,11 @@ static zval* ZEND_FASTCALL zend_jit_symtable_lookup_w(HashTable *ht, zend_string
357337 }
358338 }
359339 if (_zend_handle_numeric_str_ex (str -> val , str -> len , & idx )) {
360- retval = zend_hash_index_find (ht , idx );
361- if (!retval ) {
362- retval = zend_hash_index_add_new (ht , idx , & EG (uninitialized_zval ));
363- }
364- return retval ;
340+ return zend_hash_index_lookup (ht , idx );
365341 }
366342 } while (0 );
367343
368- retval = zend_hash_find (ht , str );
369- if (!retval ) {
370- retval = zend_hash_add_new (ht , str , & EG (uninitialized_zval ));
371- }
372- return retval ;
344+ return zend_hash_lookup (ht , str );
373345}
374346
375347static int ZEND_FASTCALL zend_jit_undefined_op_helper (uint32_t var )
@@ -713,18 +685,10 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_w_helper(zend_array *ht, zval *dim
713685 if (ZEND_HANDLE_NUMERIC (offset_key , hval )) {
714686 goto num_index ;
715687 }
716- retval = zend_hash_find (ht , offset_key );
717- if (!retval ) {
718- retval = zend_hash_add_new (ht , offset_key , & EG (uninitialized_zval ));
719- }
720- return retval ;
688+ return zend_hash_lookup (ht , offset_key );
721689
722690num_index :
723- ZEND_HASH_INDEX_FIND (ht , hval , retval , num_undef );
724- return retval ;
725-
726- num_undef :
727- retval = zend_hash_index_add_new (ht , hval , & EG (uninitialized_zval ));
691+ ZEND_HASH_INDEX_LOOKUP (ht , hval , retval );
728692 return retval ;
729693}
730694
0 commit comments