shrink trampoline iseq

This commit is contained in:
Yuichi Nishiwaki 2014-06-23 00:56:43 +09:00
parent fa179dc152
commit 4c78e0694a
1 changed files with 2 additions and 2 deletions

View File

@ -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);