From 2d544ffa01da22340173a1a4144087b409db8b62 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Tue, 4 Feb 2014 18:23:37 +0900 Subject: [PATCH] toplevel expression can be considered tail expresssion --- src/codegen.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/codegen.c b/src/codegen.c index 5226d010..d6a12a72 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -659,7 +659,7 @@ pic_analyze(pic_state *pic, pic_value obj) state = new_analyze_state(pic); - obj = analyze(state, obj, false); + obj = analyze(state, obj, true); destroy_analyze_state(state); return obj; @@ -1350,8 +1350,6 @@ pic_codegen(pic_state *pic, pic_value obj) state = new_codegen_state(pic); codegen(state, obj); - state->cxt->code[state->cxt->clen].insn = OP_RET; - state->cxt->clen++; return destroy_codegen_state(state); }