diff --git a/src/compiler.c b/src/compiler.c index 8db16aa276..598f2d8e1b 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -5163,11 +5163,6 @@ static void CompFunc(Obj func) // compile the body CompStat( OFFSET_FIRST_STAT ); - // emit the code to switch back to the old frame and return - Emit( "\n/* return; */\n" ); - - Emit( "SWITCH_TO_OLD_FRAME(oldFrame);\n" ); - Emit( "return 0;\n" ); Emit( "}\n" ); // switch back to old frame diff --git a/tst/test-compile/and_filter.g.dynamic.c b/tst/test-compile/and_filter.g.dynamic.c index b96bb6c22d..d7bd09a574 100644 --- a/tst/test-compile/and_filter.g.dynamic.c +++ b/tst/test-compile/and_filter.g.dynamic.c @@ -49,10 +49,6 @@ static Obj HdlrFunc3 ( } SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 4 */ @@ -78,10 +74,6 @@ static Obj HdlrFunc4 ( } SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 5 */ @@ -120,10 +112,6 @@ static Obj HdlrFunc5 ( } SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 6 */ @@ -162,10 +150,6 @@ static Obj HdlrFunc6 ( } SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 7 */ @@ -198,10 +182,6 @@ static Obj HdlrFunc7 ( } SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 8 */ @@ -228,10 +208,6 @@ static Obj HdlrFunc8 ( } SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 2 */ @@ -460,10 +436,6 @@ static Obj HdlrFunc2 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 1 */ @@ -514,10 +486,6 @@ static Obj HdlrFunc1 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* 'PostRestore' restore gvars, rnams, functions */ diff --git a/tst/test-compile/assert.g.dynamic.c b/tst/test-compile/assert.g.dynamic.c index 044e833066..f07c7aae7f 100644 --- a/tst/test-compile/assert.g.dynamic.c +++ b/tst/test-compile/assert.g.dynamic.c @@ -198,10 +198,6 @@ static Obj HdlrFunc2 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 1 */ @@ -243,10 +239,6 @@ static Obj HdlrFunc1 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* 'PostRestore' restore gvars, rnams, functions */ diff --git a/tst/test-compile/basics.g.dynamic.c b/tst/test-compile/basics.g.dynamic.c index 5e1ae15fb2..7b318fa0fd 100644 --- a/tst/test-compile/basics.g.dynamic.c +++ b/tst/test-compile/basics.g.dynamic.c @@ -299,10 +299,6 @@ static Obj HdlrFunc2 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 4 */ @@ -320,10 +316,6 @@ static Obj HdlrFunc4 ( C_LEN_LIST_FPL( t_1, a_args ) SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 5 */ @@ -351,10 +343,6 @@ static Obj HdlrFunc5 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 3 */ @@ -749,10 +737,6 @@ static Obj HdlrFunc3 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 6 */ @@ -1434,10 +1418,6 @@ static Obj HdlrFunc6 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 7 */ @@ -1470,10 +1450,6 @@ static Obj HdlrFunc7 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 8 */ @@ -1490,10 +1466,6 @@ static Obj HdlrFunc8 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 9 */ @@ -1744,10 +1716,6 @@ static Obj HdlrFunc9 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 10 */ @@ -2093,10 +2061,6 @@ static Obj HdlrFunc10 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 11 */ @@ -2289,10 +2253,6 @@ static Obj HdlrFunc11 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 12 */ @@ -2391,10 +2351,6 @@ static Obj HdlrFunc12 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 1 */ @@ -2792,10 +2748,6 @@ static Obj HdlrFunc1 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* 'PostRestore' restore gvars, rnams, functions */ diff --git a/tst/test-compile/callfunc.g.dynamic.c b/tst/test-compile/callfunc.g.dynamic.c index 04ea295aba..84a77cc772 100644 --- a/tst/test-compile/callfunc.g.dynamic.c +++ b/tst/test-compile/callfunc.g.dynamic.c @@ -85,10 +85,6 @@ static Obj HdlrFunc2 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 3 */ @@ -124,10 +120,6 @@ static Obj HdlrFunc3 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 4 */ @@ -172,10 +164,6 @@ static Obj HdlrFunc4 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 5 */ @@ -219,10 +207,6 @@ static Obj HdlrFunc5 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 6 */ @@ -266,10 +250,6 @@ static Obj HdlrFunc6 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 7 */ @@ -323,10 +303,6 @@ static Obj HdlrFunc7 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 9 */ @@ -343,10 +319,6 @@ static Obj HdlrFunc9 ( /* return args; */ SWITCH_TO_OLD_FRAME(oldFrame); return a_args; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 10 */ @@ -374,10 +346,6 @@ static Obj HdlrFunc10 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 11 */ @@ -405,10 +373,6 @@ static Obj HdlrFunc11 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 12 */ @@ -436,10 +400,6 @@ static Obj HdlrFunc12 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 13 */ @@ -467,10 +427,6 @@ static Obj HdlrFunc13 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 14 */ @@ -498,10 +454,6 @@ static Obj HdlrFunc14 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 15 */ @@ -529,10 +481,6 @@ static Obj HdlrFunc15 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 8 */ @@ -922,10 +870,6 @@ static Obj HdlrFunc8 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 1 */ @@ -1085,10 +1029,6 @@ static Obj HdlrFunc1 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* 'PostRestore' restore gvars, rnams, functions */ diff --git a/tst/test-compile/function_types.g.dynamic.c b/tst/test-compile/function_types.g.dynamic.c index e5763343c4..d514729b9e 100644 --- a/tst/test-compile/function_types.g.dynamic.c +++ b/tst/test-compile/function_types.g.dynamic.c @@ -53,10 +53,6 @@ static Obj HdlrFunc2 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 3 */ @@ -89,10 +85,6 @@ static Obj HdlrFunc3 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 4 */ @@ -122,10 +114,6 @@ static Obj HdlrFunc4 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 5 */ @@ -163,10 +151,6 @@ static Obj HdlrFunc5 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 6 */ @@ -196,10 +180,6 @@ static Obj HdlrFunc6 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 8 */ @@ -224,10 +204,6 @@ static Obj HdlrFunc8 ( CHECK_FUNC_RESULT( t_1 ); SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 9 */ @@ -252,10 +228,6 @@ static Obj HdlrFunc9 ( CHECK_FUNC_RESULT( t_1 ); SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 10 */ @@ -280,10 +252,6 @@ static Obj HdlrFunc10 ( CHECK_FUNC_RESULT( t_1 ); SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 11 */ @@ -308,10 +276,6 @@ static Obj HdlrFunc11 ( CHECK_FUNC_RESULT( t_1 ); SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 7 */ @@ -494,10 +458,6 @@ static Obj HdlrFunc7 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 1 */ @@ -613,10 +573,6 @@ static Obj HdlrFunc1 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* 'PostRestore' restore gvars, rnams, functions */ diff --git a/tst/test-compile/info.g.dynamic.c b/tst/test-compile/info.g.dynamic.c index fbf25d42f7..a734501fec 100644 --- a/tst/test-compile/info.g.dynamic.c +++ b/tst/test-compile/info.g.dynamic.c @@ -157,10 +157,6 @@ static Obj HdlrFunc2 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 1 */ @@ -197,10 +193,6 @@ static Obj HdlrFunc1 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* 'PostRestore' restore gvars, rnams, functions */ diff --git a/tst/test-compile/plus.g.dynamic.c b/tst/test-compile/plus.g.dynamic.c index 7ba805ebed..093eb77bd9 100644 --- a/tst/test-compile/plus.g.dynamic.c +++ b/tst/test-compile/plus.g.dynamic.c @@ -25,10 +25,6 @@ static Obj HdlrFunc2 ( C_SUM_INTOBJS( t_1, INTOBJ_INT(1), INTOBJ_INT(2) ) SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 1 */ @@ -57,10 +53,6 @@ static Obj HdlrFunc1 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* 'PostRestore' restore gvars, rnams, functions */ diff --git a/tst/test-compile/print_various.g.dynamic.c b/tst/test-compile/print_various.g.dynamic.c index 17e05d909a..a2098a4670 100644 --- a/tst/test-compile/print_various.g.dynamic.c +++ b/tst/test-compile/print_various.g.dynamic.c @@ -132,10 +132,6 @@ static Obj HdlrFunc2 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 1 */ @@ -169,10 +165,6 @@ static Obj HdlrFunc1 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* 'PostRestore' restore gvars, rnams, functions */ diff --git a/tst/test-compile/ranges.g.dynamic.c b/tst/test-compile/ranges.g.dynamic.c index 8d07a245f7..2f8a71ac0b 100644 --- a/tst/test-compile/ranges.g.dynamic.c +++ b/tst/test-compile/ranges.g.dynamic.c @@ -36,10 +36,6 @@ static Obj HdlrFunc2 ( t_1 = Range2Check( a_a, a_b ); SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 3 */ @@ -59,10 +55,6 @@ static Obj HdlrFunc3 ( t_1 = Range3Check( a_a, a_b, a_c ); SWITCH_TO_OLD_FRAME(oldFrame); return t_1; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 4 */ @@ -286,10 +278,6 @@ static Obj HdlrFunc4 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* handler for function 1 */ @@ -357,10 +345,6 @@ static Obj HdlrFunc1 ( /* return; */ SWITCH_TO_OLD_FRAME(oldFrame); return 0; - - /* return; */ - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; } /* 'PostRestore' restore gvars, rnams, functions */