@@ -1594,19 +1594,6 @@ function gen_halt_handler($f, $kind) {
15941594 out ($ f ,"} \n\n" );
15951595}
15961596
1597- function gen_interrupt_func ($ f , $ kind , $ spec ) {
1598- $ cconv = $ kind === ZEND_VM_KIND_TAILCALL ? 'ZEND_OPCODE_HANDLER_CCONV ' : 'ZEND_OPCODE_HANDLER_FUNC_CCONV ' ;
1599- $ variant = $ kind === ZEND_VM_KIND_TAILCALL ? '_TAILCALL ' : '' ;
1600- out ($ f , "static ZEND_COLD zend_never_inline ZEND_OPCODE_HANDLER_RET {$ cconv } zend_interrupt {$ variant }(ZEND_OPCODE_HANDLER_ARGS) { \n" );
1601- out ($ f ,"\tSAVE_OPLINE(); \n" );
1602- if ($ kind === ZEND_VM_KIND_TAILCALL ) {
1603- out ($ f ,"\tZEND_VM_TAIL_CALL(zend_interrupt_helper " .($ spec ?"_SPEC " :"" )."_TAILCALL(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)); \n" );
1604- } else {
1605- out ($ f , "\treturn &call_interrupt_op; \n" );
1606- }
1607- out ($ f , "} \n" );
1608- }
1609-
16101597function extra_spec_name ($ extra_spec ) {
16111598 global $ prefix ;
16121599
@@ -1817,14 +1804,10 @@ function gen_executor_code($f, $spec, $kind, $prolog, &$switch_labels = array())
18171804 switch ($ kind ) {
18181805 case ZEND_VM_KIND_CALL :
18191806 gen_null_handler ($ f , $ kind );
1820- out ($ f , "#if ZEND_VM_KIND == ZEND_VM_KIND_TAILCALL \n" );
1821- gen_interrupt_func ($ f , $ kind , $ spec );
1822- out ($ f , "#endif \n" );
18231807 break ;
18241808 case ZEND_VM_KIND_TAILCALL :
18251809 gen_null_handler ($ f , $ kind );
18261810 gen_halt_handler ($ f , $ kind );
1827- gen_interrupt_func ($ f , $ kind , $ spec );
18281811 break ;
18291812 case ZEND_VM_KIND_SWITCH :
18301813 out ($ f ,"default: ZEND_NULL_LABEL: \n" );
@@ -1862,7 +1845,7 @@ function gen_executor_code($f, $spec, $kind, $prolog, &$switch_labels = array())
18621845 out ($ f , "#pragma push_macro( \"ZEND_VM_INTERRUPT \") \n" );
18631846 out ($ f , "#undef ZEND_VM_INTERRUPT \n" );
18641847 out ($ f , "#define ZEND_VM_CONTINUE(handler) return opline \n" );
1865- out ($ f , "#define ZEND_VM_INTERRUPT() return zend_interrupt (ZEND_OPCODE_HANDLER_ARGS_PASSTHRU) \n" );
1848+ out ($ f , "#define ZEND_VM_INTERRUPT() return zend_interrupt_helper " .( $ spec ? " _SPEC " : "" ). " (ZEND_OPCODE_HANDLER_ARGS_PASSTHRU) \n" );
18661849 out ($ f , $ delayed_helpers );
18671850 out ($ f , "#pragma pop_macro( \"ZEND_VM_INTERRUPT \") \n" );
18681851 out ($ f , "#pragma pop_macro( \"ZEND_VM_CONTINUE \") \n" );
@@ -1917,10 +1900,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
19171900 if ($ kind == ZEND_VM_KIND_HYBRID || $ kind == ZEND_VM_KIND_CALL ) {
19181901 out ($ f ,"#if ZEND_VM_KIND == ZEND_VM_KIND_HYBRID || ZEND_VM_KIND == ZEND_VM_KIND_TAILCALL \n\n" );
19191902 out ($ f ,"static zend_vm_opcode_handler_func_t const * zend_opcode_handler_funcs; \n" );
1920- out ($ f ,"#endif \n\n" );
1921- out ($ f ,"#if ZEND_VM_KIND == ZEND_VM_KIND_TAILCALL \n" );
1922- out ($ f ,"static const zend_op call_interrupt_op; \n" );
1923- out ($ f ,"#endif \n\n" );
1903+ out ($ f ,"#endif \n" );
19241904 }
19251905 out ($ f ,"#if (ZEND_VM_KIND != ZEND_VM_KIND_HYBRID && ZEND_VM_KIND != ZEND_VM_KIND_TAILCALL) || !ZEND_VM_SPEC \n" );
19261906 out ($ f ,"static zend_vm_opcode_handler_t zend_vm_get_opcode_handler(uint8_t opcode, const zend_op* op); \n" );
@@ -2153,17 +2133,11 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
21532133 out ($ f ,"# define ZEND_VM_TAIL_CALL(call) ZEND_MUSTTAIL return call \n" );
21542134 out ($ f ,"# define ZEND_VM_CONTINUE() ZEND_VM_TAIL_CALL(opline->handler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)) \n" );
21552135 out ($ f ,"# define ZEND_VM_RETURN() opline = &call_halt_op; ZEND_VM_CONTINUE() \n" );
2156- out ($ f ,"# define ZEND_VM_DISPATCH_TO_HELPER(call) \\\n" );
2157- out ($ f ," do { \\\n" );
2158- out ($ f ," opline = call; \\\n" );
2159- out ($ f ," ZEND_VM_TAIL_CALL(opline->handler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)); \\\n" );
2160- out ($ f ," } while (0) \n" );
2136+ out ($ f ,"# define ZEND_VM_DISPATCH_TO_HELPER(call) return call \n" );
21612137 out ($ f ,"# define ZEND_VM_DISPATCH_TO_LEAVE_HELPER(helper) opline = &call_leave_op; SAVE_OPLINE(); ZEND_VM_CONTINUE() \n" );
2162- out ($ f ,"# define ZEND_VM_INTERRUPT() ZEND_VM_TAIL_CALL(zend_interrupt_TAILCALL (ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)) \n" );
2138+ out ($ f ,"# define ZEND_VM_INTERRUPT() ZEND_VM_TAIL_CALL(zend_interrupt_helper " .( $ spec ? " _SPEC " : "" ). " _TAILCALL (ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)) \n" );
21632139 out ($ f ,"\n" );
21642140 out ($ f ,"static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV zend_interrupt_helper " .($ spec ?"_SPEC " :"" )."_TAILCALL(ZEND_OPCODE_HANDLER_ARGS); \n" );
2165- out ($ f ,"static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV zend_interrupt(ZEND_OPCODE_HANDLER_ARGS); \n" );
2166- out ($ f ,"static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV zend_interrupt_TAILCALL(ZEND_OPCODE_HANDLER_ARGS); \n" );
21672141 out ($ f ,"static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_NULL_TAILCALL_HANDLER(ZEND_OPCODE_HANDLER_ARGS); \n" );
21682142 out ($ f ,"static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_HALT_TAILCALL_HANDLER(ZEND_OPCODE_HANDLER_ARGS); \n" );
21692143 out ($ f ,"static zend_never_inline const zend_op *ZEND_OPCODE_HANDLER_CCONV zend_leave_helper_SPEC_TAILCALL(zend_execute_data *ex, const zend_op *opline); \n" );
@@ -2174,9 +2148,6 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
21742148 out ($ f ,"static const zend_op call_leave_op = { \n" );
21752149 out ($ f ," .handler = zend_leave_helper_SPEC_TAILCALL, \n" );
21762150 out ($ f ,"}; \n" );
2177- out ($ f ,"static const zend_op call_interrupt_op = { \n" );
2178- out ($ f ," .handler = zend_interrupt_helper_SPEC_TAILCALL, \n" );
2179- out ($ f ,"}; \n" );
21802151 out ($ f ,"\n" );
21812152
21822153 gen_executor_code ($ f , $ spec , ZEND_VM_KIND_TAILCALL , $ m [1 ]);
0 commit comments