@@ -2258,11 +2258,9 @@ static zend_op *zend_delayed_compile_end(uint32_t offset) /* {{{ */
2258
2258
2259
2259
ZEND_ASSERT (count >= offset );
2260
2260
for (i = offset ; i < count ; ++ i ) {
2261
- opline = get_next_op ();
2262
- memcpy (opline , & oplines [i ], sizeof (zend_op ));
2263
- if (opline -> opcode == ZEND_JMP_NULL ) {
2264
- uint32_t opnum = get_next_op_number () - 1 ;
2265
- zend_stack_push (& CG (short_circuiting_opnums ), & opnum );
2261
+ if (oplines [i ].opcode != ZEND_NOP ) {
2262
+ opline = get_next_op ();
2263
+ memcpy (opline , & oplines [i ], sizeof (zend_op ));
2266
2264
}
2267
2265
}
2268
2266
@@ -2890,11 +2888,18 @@ static zend_op *zend_delayed_compile_prop(znode *result, zend_ast *ast, uint32_t
2890
2888
opline = zend_delayed_compile_var (& obj_node , obj_ast , type , 0 );
2891
2889
zend_separate_if_call_and_write (& obj_node , obj_ast , type );
2892
2890
if (nullsafe ) {
2893
- /* We will push to the short_circuiting_opnums stack in zend_delayed_compile_end(). */
2894
- opline = zend_delayed_emit_op (NULL , ZEND_JMP_NULL , & obj_node , NULL );
2895
- if (opline -> op1_type == IS_CONST ) {
2896
- Z_TRY_ADDREF_P (CT_CONSTANT (opline -> op1 ));
2891
+ /* Flush delayed oplines */
2892
+ zend_op * opline = NULL , * oplines = zend_stack_base (& CG (delayed_oplines_stack ));
2893
+ uint32_t i , count = zend_stack_count (& CG (delayed_oplines_stack ));
2894
+
2895
+ for (i = 0 ; i < count ; ++ i ) {
2896
+ if (oplines [i ].opcode != ZEND_NOP ) {
2897
+ opline = get_next_op ();
2898
+ memcpy (opline , & oplines [i ], sizeof (zend_op ));
2899
+ oplines [i ].opcode = ZEND_NOP ;
2900
+ }
2897
2901
}
2902
+ zend_emit_jmp_null (& obj_node );
2898
2903
}
2899
2904
}
2900
2905
0 commit comments