@@ -259,16 +259,6 @@ static zval* ZEND_FASTCALL zend_jit_hash_index_lookup_rw(HashTable *ht, zend_lon
259
259
return retval ;
260
260
}
261
261
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
-
272
262
static zval * ZEND_FASTCALL zend_jit_hash_lookup_rw (HashTable * ht , zend_string * str )
273
263
{
274
264
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
285
275
return retval ;
286
276
}
287
277
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
-
297
278
static zval * ZEND_FASTCALL zend_jit_symtable_lookup_rw (HashTable * ht , zend_string * str )
298
279
{
299
280
zend_ulong idx ;
@@ -342,7 +323,6 @@ static zval* ZEND_FASTCALL zend_jit_symtable_lookup_w(HashTable *ht, zend_string
342
323
{
343
324
zend_ulong idx ;
344
325
register const char * tmp = str -> val ;
345
- zval * retval ;
346
326
347
327
do {
348
328
if (* tmp > '9' ) {
@@ -357,19 +337,11 @@ static zval* ZEND_FASTCALL zend_jit_symtable_lookup_w(HashTable *ht, zend_string
357
337
}
358
338
}
359
339
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 );
365
341
}
366
342
} while (0 );
367
343
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 );
373
345
}
374
346
375
347
static 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
713
685
if (ZEND_HANDLE_NUMERIC (offset_key , hval )) {
714
686
goto num_index ;
715
687
}
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 );
721
689
722
690
num_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 );
728
692
return retval ;
729
693
}
730
694
0 commit comments