From 4c78e0694a940ccb187fc529577bbd28610538a9 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 23 Jun 2014 00:56:43 +0900 Subject: [PATCH] shrink trampoline iseq --- src/vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vm.c b/src/vm.c index 1fe153a4..9e4509f4 100644 --- a/src/vm.c +++ b/src/vm.c @@ -997,7 +997,7 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv) pic_value pic_apply_trampoline(pic_state *pic, struct pic_proc *proc, pic_value args) { - static const pic_code iseq[] = { { OP_NOP, {0} }, { OP_TAILCALL, { .i = -1 } } }; + static const pic_code iseq = { OP_TAILCALL, { .i = -1 } }; pic_value v, *sp; pic_callinfo *ci; @@ -1010,7 +1010,7 @@ pic_apply_trampoline(pic_state *pic, struct pic_proc *proc, pic_value args) } ci = PUSHCI(); - ci->ip = (pic_code *)iseq; + ci->ip = (pic_code *)&iseq - 1; ci->fp = pic->sp; ci->retc = pic_length(pic, args); return pic_obj_value(proc);