remove pic->iseq

This commit is contained in:
Yuichi Nishiwaki 2016-03-01 03:14:18 +09:00
parent b0f05f54a6
commit ca4fb058d1
4 changed files with 6 additions and 11 deletions

View File

@ -20,7 +20,7 @@ struct fullcont {
size_t ci_offset;
ptrdiff_t ci_len;
struct code *ip;
const struct code *ip;
struct object **arena;
size_t arena_size, arena_idx;

View File

@ -13,7 +13,7 @@ struct cont {
ptrdiff_t sp_offset;
ptrdiff_t ci_offset;
size_t arena_idx;
struct code *ip;
const struct code *ip;
int retc;
pic_value *retv;

View File

@ -23,7 +23,7 @@ struct lib {
struct callinfo {
int argc, retc;
struct code *ip;
const struct code *ip;
pic_value *fp;
struct irep *irep;
struct context *cxt;
@ -48,7 +48,7 @@ struct pic_state {
struct callinfo *ci;
struct callinfo *cibase, *ciend;
struct code *ip;
const struct code *ip;
const char *lib;
@ -62,7 +62,6 @@ struct pic_state {
struct list_head ireps;
xFILE files[XOPEN_MAX];
struct code iseq[2]; /* for pic_apply_trampoline */
bool gc_enable;
struct heap *heap;

View File

@ -783,15 +783,11 @@ pic_apply(pic_state *pic, pic_value proc, int argc, pic_value *argv)
pic_value
pic_applyk(pic_state *pic, pic_value proc, int argc, pic_value *args)
{
static const struct code iseq[2] = { { OP_NOP, 0, 0 }, { OP_TAILCALL, -1, 0 } };
pic_value *sp;
struct callinfo *ci;
int i;
pic->iseq[0].insn = OP_NOP;
pic->iseq[0].a = 0;
pic->iseq[1].insn = OP_TAILCALL;
pic->iseq[1].a = -1;
*pic->sp++ = proc;
sp = pic->sp;
@ -800,7 +796,7 @@ pic_applyk(pic_state *pic, pic_value proc, int argc, pic_value *args)
}
ci = PUSHCI();
ci->ip = pic->iseq;
ci->ip = iseq;
ci->fp = pic->sp;
ci->retc = (int)argc;