From fa3849542563d9b4688a8f46a35de523b81cc75e Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Wed, 23 Mar 2011 20:37:07 +0430 Subject: [PATCH] gen: don't generate excess jumps for the last return --- gen.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gen.c b/gen.c index ea43764..2f5749f 100644 --- a/gen.c +++ b/gen.c @@ -780,6 +780,10 @@ void o_ret(int rets) void o_func_end(void) { int i; + if (nret && ret[nret - 1] == cslen - 4) { + cslen -= 4; + nret--; + } for (i = 0; i < nret; i++) o_filljmp(ret[i]); i_epilog(); -- 2.11.4.GIT