From a3b0fa701b83ee18915b94025e048775c8406c0d Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Tue, 4 Feb 2014 10:46:36 +0900 Subject: [PATCH] rename pic_callinfo.pc -> ip --- include/picrin.h | 2 +- src/vm.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/picrin.h b/include/picrin.h index 6cb7b51f..f4b7f529 100644 --- a/include/picrin.h +++ b/include/picrin.h @@ -57,7 +57,7 @@ struct pic_code; typedef struct { int argc; - struct pic_code *pc; + struct pic_code *ip; pic_value *fp; struct pic_env *env; } pic_callinfo; diff --git a/src/vm.c b/src/vm.c index e61c62ff..14d713dc 100644 --- a/src/vm.c +++ b/src/vm.c @@ -577,13 +577,13 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv) ci = PUSHCI(); ci->argc = c.u.i; - ci->pc = pic->ip; + ci->ip = pic->ip; ci->fp = pic->sp - c.u.i; ci->env = NULL; if (pic_proc_cfunc_p(x)) { v = proc->u.cfunc(pic); ci = POPCI(); - pic->ip = ci->pc; + pic->ip = ci->ip; pic->sp = ci->fp; PUSH(v); pic_gc_arena_restore(pic, ai); @@ -643,7 +643,7 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv) pic->ci->fp[i] = argv[i]; } pic->sp = pic->ci->fp + argc; - pic->ip = POPCI()->pc; + pic->ip = POPCI()->ip; /* c is not changed */ goto L_CALL; @@ -660,7 +660,7 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv) else { v = POP(); ci = POPCI(); - pic->ip = ci->pc; + pic->ip = ci->ip; pic->sp = ci->fp; PUSH(v); }