@@ -147,7 +147,7 @@ static zval* ZEND_FASTCALL zend_jit_hash_index_lookup_w(HashTable *ht, zend_long
147
147
148
148
static zval * ZEND_FASTCALL zend_jit_hash_lookup_rw (HashTable * ht , zend_string * str )
149
149
{
150
- zval * retval = zend_hash_find (ht , str );
150
+ zval * retval = zend_hash_find_ex (ht , str , 1 );
151
151
152
152
if (retval ) {
153
153
if (UNEXPECTED (Z_TYPE_P (retval ) == IS_INDIRECT )) {
@@ -166,7 +166,7 @@ static zval* ZEND_FASTCALL zend_jit_hash_lookup_rw(HashTable *ht, zend_string *s
166
166
167
167
static zval * ZEND_FASTCALL zend_jit_hash_lookup_w (HashTable * ht , zend_string * str )
168
168
{
169
- zval * retval = zend_hash_find (ht , str );
169
+ zval * retval = zend_hash_find_ex (ht , str , 1 );
170
170
171
171
if (retval ) {
172
172
if (UNEXPECTED (Z_TYPE_P (retval ) == IS_INDIRECT )) {
@@ -185,6 +185,7 @@ static zval* ZEND_FASTCALL zend_jit_symtable_lookup_rw(HashTable *ht, zend_strin
185
185
{
186
186
zend_ulong idx ;
187
187
register const char * tmp = str -> val ;
188
+ zval * retval ;
188
189
189
190
do {
190
191
if (* tmp > '9' ) {
@@ -199,8 +200,7 @@ static zval* ZEND_FASTCALL zend_jit_symtable_lookup_rw(HashTable *ht, zend_strin
199
200
}
200
201
}
201
202
if (_zend_handle_numeric_str_ex (str -> val , str -> len , & idx )) {
202
- zval * retval = zend_hash_index_find (ht , idx );
203
-
203
+ retval = zend_hash_index_find (ht , idx );
204
204
if (!retval ) {
205
205
zend_error (E_NOTICE ,"Undefined index: %s" , ZSTR_VAL (str ));
206
206
retval = zend_hash_index_update (ht , idx , & EG (uninitialized_zval ));
@@ -209,13 +209,27 @@ static zval* ZEND_FASTCALL zend_jit_symtable_lookup_rw(HashTable *ht, zend_strin
209
209
}
210
210
} while (0 );
211
211
212
- return zend_jit_hash_lookup_rw (ht , str );
212
+ retval = zend_hash_find (ht , str );
213
+ if (retval ) {
214
+ if (UNEXPECTED (Z_TYPE_P (retval ) == IS_INDIRECT )) {
215
+ retval = Z_INDIRECT_P (retval );
216
+ if (UNEXPECTED (Z_TYPE_P (retval ) == IS_UNDEF )) {
217
+ zend_error (E_NOTICE ,"Undefined index: %s" , ZSTR_VAL (str ));
218
+ ZVAL_NULL (retval );
219
+ }
220
+ }
221
+ } else {
222
+ zend_error (E_NOTICE ,"Undefined index: %s" , ZSTR_VAL (str ));
223
+ retval = zend_hash_update (ht , str , & EG (uninitialized_zval ));
224
+ }
225
+ return retval ;
213
226
}
214
227
215
228
static zval * ZEND_FASTCALL zend_jit_symtable_lookup_w (HashTable * ht , zend_string * str )
216
229
{
217
230
zend_ulong idx ;
218
231
register const char * tmp = str -> val ;
232
+ zval * retval ;
219
233
220
234
do {
221
235
if (* tmp > '9' ) {
@@ -230,16 +244,26 @@ static zval* ZEND_FASTCALL zend_jit_symtable_lookup_w(HashTable *ht, zend_string
230
244
}
231
245
}
232
246
if (_zend_handle_numeric_str_ex (str -> val , str -> len , & idx )) {
233
- zval * retval = zend_hash_index_find (ht , idx );
234
-
247
+ retval = zend_hash_index_find (ht , idx );
235
248
if (!retval ) {
236
249
retval = zend_hash_index_add_new (ht , idx , & EG (uninitialized_zval ));
237
250
}
238
251
return retval ;
239
252
}
240
253
} while (0 );
241
254
242
- return zend_jit_hash_lookup_w (ht , str );
255
+ retval = zend_hash_find (ht , str );
256
+ if (retval ) {
257
+ if (UNEXPECTED (Z_TYPE_P (retval ) == IS_INDIRECT )) {
258
+ retval = Z_INDIRECT_P (retval );
259
+ if (UNEXPECTED (Z_TYPE_P (retval ) == IS_UNDEF )) {
260
+ ZVAL_NULL (retval );
261
+ }
262
+ }
263
+ } else {
264
+ retval = zend_hash_add_new (ht , str , & EG (uninitialized_zval ));
265
+ }
266
+ return retval ;
243
267
}
244
268
245
269
static void ZEND_FASTCALL zend_jit_undefined_op_helper (uint32_t var )
0 commit comments