118
118
typedef int (ZEND_FASTCALL * incdec_t )(zval * );
119
119
120
120
#define get_zval_ptr (op_type , node , type ) _get_zval_ptr(op_type, node, type EXECUTE_DATA_CC OPLINE_CC)
121
+ #define get_zval_ptr_delayed (op_type , node , type ) _get_zval_ptr_delayed(op_type, node, type EXECUTE_DATA_CC OPLINE_CC)
121
122
#define get_zval_ptr_deref (op_type , node , type ) _get_zval_ptr_deref(op_type, node, type EXECUTE_DATA_CC OPLINE_CC)
123
+ #define get_zval_ptr_deref_delayed (op_type , node , type ) _get_zval_ptr_deref_delayed(op_type, node, type EXECUTE_DATA_CC OPLINE_CC)
122
124
#define get_zval_ptr_undef (op_type , node , type ) _get_zval_ptr_undef(op_type, node, type EXECUTE_DATA_CC OPLINE_CC)
125
+ #define get_zval_ptr_undef_delayed (op_type , node , type ) _get_zval_ptr_undef_delayed(op_type, node, type EXECUTE_DATA_CC OPLINE_CC)
123
126
#define get_op_data_zval_ptr_r (op_type , node ) _get_op_data_zval_ptr_r(op_type, node EXECUTE_DATA_CC OPLINE_CC)
127
+ #define get_op_data_zval_ptr_r_delayed (op_type , node ) _get_op_data_zval_ptr_r_delayed(op_type, node EXECUTE_DATA_CC OPLINE_CC)
124
128
#define get_op_data_zval_ptr_deref_r (op_type , node ) _get_op_data_zval_ptr_deref_r(op_type, node EXECUTE_DATA_CC OPLINE_CC)
129
+ #define get_op_data_zval_ptr_deref_r_delayed (op_type , node ) _get_op_data_zval_ptr_deref_r_delayed(op_type, node EXECUTE_DATA_CC OPLINE_CC)
125
130
#define get_zval_ptr_ptr (op_type , node , type ) _get_zval_ptr_ptr(op_type, node, type EXECUTE_DATA_CC)
126
131
#define get_zval_ptr_ptr_undef (op_type , node , type ) _get_zval_ptr_ptr(op_type, node, type EXECUTE_DATA_CC)
127
132
#define get_obj_zval_ptr (op_type , node , type ) _get_obj_zval_ptr(op_type, node, type EXECUTE_DATA_CC OPLINE_CC)
133
+ #define get_obj_zval_ptr_delayed (op_type , node , type ) _get_obj_zval_ptr_delayed(op_type, node, type EXECUTE_DATA_CC OPLINE_CC)
128
134
#define get_obj_zval_ptr_undef (op_type , node , type ) _get_obj_zval_ptr_undef(op_type, node, type EXECUTE_DATA_CC OPLINE_CC)
135
+ #define get_obj_zval_ptr_undef_delayed (op_type , node , type ) _get_obj_zval_ptr_undef_delayed(op_type, node, type EXECUTE_DATA_CC OPLINE_CC)
129
136
#define get_obj_zval_ptr_ptr (op_type , node , type ) _get_obj_zval_ptr_ptr(op_type, node, type EXECUTE_DATA_CC)
130
137
131
138
#define RETURN_VALUE_USED (opline ) ((opline)->result_type != IS_UNUSED)
@@ -425,6 +432,14 @@ static zend_always_inline zval *_get_zval_ptr(int op_type, znode_op node, int ty
425
432
}
426
433
}
427
434
435
+ static zend_always_inline zval * _get_zval_ptr_delayed (int op_type , znode_op node , int type EXECUTE_DATA_DC OPLINE_DC )
436
+ {
437
+ if (op_type == IS_CONST ) {
438
+ return RT_CONSTANT_DELAYED (opline , node );
439
+ }
440
+ return get_zval_ptr (op_type , node , type );
441
+ }
442
+
428
443
static zend_always_inline zval * _get_op_data_zval_ptr_r (int op_type , znode_op node EXECUTE_DATA_DC OPLINE_DC )
429
444
{
430
445
if (op_type & (IS_TMP_VAR |IS_VAR )) {
@@ -445,6 +460,14 @@ static zend_always_inline zval *_get_op_data_zval_ptr_r(int op_type, znode_op no
445
460
}
446
461
}
447
462
463
+ static zend_always_inline zval * _get_op_data_zval_ptr_r_delayed (int op_type , znode_op node EXECUTE_DATA_DC OPLINE_DC )
464
+ {
465
+ if (op_type == IS_CONST ) {
466
+ return RT_CONSTANT (RT_CONSTANT_DELAYED_OPLINE (opline )+ 1 , (opline + 1 )-> op1 );
467
+ }
468
+ return get_op_data_zval_ptr_r (op_type , node );
469
+ }
470
+
448
471
static zend_always_inline ZEND_ATTRIBUTE_UNUSED zval * _get_zval_ptr_deref (int op_type , znode_op node , int type EXECUTE_DATA_DC OPLINE_DC )
449
472
{
450
473
if (op_type & (IS_TMP_VAR |IS_VAR )) {
@@ -465,6 +488,14 @@ static zend_always_inline ZEND_ATTRIBUTE_UNUSED zval *_get_zval_ptr_deref(int op
465
488
}
466
489
}
467
490
491
+ static zend_always_inline ZEND_ATTRIBUTE_UNUSED zval * _get_zval_ptr_deref_delayed (int op_type , znode_op node , int type EXECUTE_DATA_DC OPLINE_DC )
492
+ {
493
+ if (op_type == IS_CONST ) {
494
+ return RT_CONSTANT_DELAYED (opline , node );
495
+ }
496
+ return get_zval_ptr_deref (op_type , node , type );
497
+ }
498
+
468
499
static zend_always_inline ZEND_ATTRIBUTE_UNUSED zval * _get_op_data_zval_ptr_deref_r (int op_type , znode_op node EXECUTE_DATA_DC OPLINE_DC )
469
500
{
470
501
if (op_type & (IS_TMP_VAR |IS_VAR )) {
@@ -485,6 +516,14 @@ static zend_always_inline ZEND_ATTRIBUTE_UNUSED zval *_get_op_data_zval_ptr_dere
485
516
}
486
517
}
487
518
519
+ static zend_always_inline ZEND_ATTRIBUTE_UNUSED zval * _get_op_data_zval_ptr_deref_r_delayed (int op_type , znode_op node EXECUTE_DATA_DC OPLINE_DC )
520
+ {
521
+ if (op_type == IS_CONST ) {
522
+ return RT_CONSTANT (RT_CONSTANT_DELAYED_OPLINE (opline )+ 1 , (opline + 1 )-> op1 );
523
+ }
524
+ return get_op_data_zval_ptr_deref_r (op_type , node );
525
+ }
526
+
488
527
static zend_always_inline zval * _get_zval_ptr_undef (int op_type , znode_op node , int type EXECUTE_DATA_DC OPLINE_DC )
489
528
{
490
529
if (op_type & (IS_TMP_VAR |IS_VAR )) {
@@ -505,6 +544,14 @@ static zend_always_inline zval *_get_zval_ptr_undef(int op_type, znode_op node,
505
544
}
506
545
}
507
546
547
+ static zend_always_inline zval * _get_zval_ptr_undef_delayed (int op_type , znode_op node , int type EXECUTE_DATA_DC OPLINE_DC )
548
+ {
549
+ if (op_type == IS_CONST ) {
550
+ return RT_CONSTANT_DELAYED (opline , node );
551
+ }
552
+ return get_zval_ptr_undef (op_type , node , type );
553
+ }
554
+
508
555
static zend_always_inline zval * _get_zval_ptr_ptr_var (uint32_t var EXECUTE_DATA_DC )
509
556
{
510
557
zval * ret = EX_VAR (var );
@@ -533,6 +580,14 @@ static inline ZEND_ATTRIBUTE_UNUSED zval *_get_obj_zval_ptr(int op_type, znode_o
533
580
return get_zval_ptr (op_type , op , type );
534
581
}
535
582
583
+ static inline ZEND_ATTRIBUTE_UNUSED zval * _get_obj_zval_ptr_delayed (int op_type , znode_op op , int type EXECUTE_DATA_DC OPLINE_DC )
584
+ {
585
+ if (op_type == IS_UNUSED ) {
586
+ return & EX (This );
587
+ }
588
+ return get_zval_ptr_delayed (op_type , op , type );
589
+ }
590
+
536
591
static inline ZEND_ATTRIBUTE_UNUSED zval * _get_obj_zval_ptr_undef (int op_type , znode_op op , int type EXECUTE_DATA_DC OPLINE_DC )
537
592
{
538
593
if (op_type == IS_UNUSED ) {
@@ -541,6 +596,14 @@ static inline ZEND_ATTRIBUTE_UNUSED zval *_get_obj_zval_ptr_undef(int op_type, z
541
596
return get_zval_ptr_undef (op_type , op , type );
542
597
}
543
598
599
+ static inline ZEND_ATTRIBUTE_UNUSED zval * _get_obj_zval_ptr_undef_delayed (int op_type , znode_op op , int type EXECUTE_DATA_DC OPLINE_DC )
600
+ {
601
+ if (op_type == IS_UNUSED ) {
602
+ return & EX (This );
603
+ }
604
+ return get_zval_ptr_undef_delayed (op_type , op , type );
605
+ }
606
+
544
607
static inline ZEND_ATTRIBUTE_UNUSED zval * _get_obj_zval_ptr_ptr (int op_type , znode_op node , int type EXECUTE_DATA_DC )
545
608
{
546
609
if (op_type == IS_UNUSED ) {
@@ -2231,6 +2294,23 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_undefined_offset_delayed(zend_long lv
2231
2294
zend_error_delayed (E_WARNING , "Undefined array key " ZEND_LONG_FMT , lval );
2232
2295
}
2233
2296
2297
+ ZEND_API void ZEND_FASTCALL zend_handle_delayed_errors (void )
2298
+ {
2299
+ /* Clear EG(delayed_errors), as more errors may be delayed while we are handling these. */
2300
+ HashTable ht ;
2301
+ memcpy (& ht , & EG (delayed_errors ), sizeof (HashTable ));
2302
+ zend_hash_init (& EG (delayed_errors ), 0 , NULL , NULL , 0 );
2303
+
2304
+ zend_error_info * info ;
2305
+ ZEND_HASH_FOREACH_PTR (& ht , info ) {
2306
+ zend_error_zstr_at (info -> type , info -> filename , info -> lineno , info -> message );
2307
+ zend_string_release (info -> filename );
2308
+ zend_string_release (info -> message );
2309
+ efree (info );
2310
+ } ZEND_HASH_FOREACH_END ();
2311
+ zend_hash_destroy (& ht );
2312
+ }
2313
+
2234
2314
ZEND_API ZEND_COLD zval * ZEND_FASTCALL zend_undefined_index_write (HashTable * ht , zend_string * offset )
2235
2315
{
2236
2316
zval * retval ;
@@ -3242,6 +3322,7 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c
3242
3322
3243
3323
if (prop_op_type == IS_CONST ) {
3244
3324
name = Z_STR_P (prop_ptr );
3325
+ tmp_name = NULL ;
3245
3326
} else {
3246
3327
name = zval_get_tmp_string (prop_ptr , & tmp_name );
3247
3328
}
0 commit comments