From 0b0ef7806b96292ad11378dad7f9c6ae8274ad71 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 26 Oct 2018 06:35:59 -0700 Subject: vm: rename remaining vestiges of ftab terminology. * vm.c (struct vm_stent): Rename fb and fbloc members to bind and bind_loc. (vm_desc_mark, vm_stab, vm_invalidate_binding): Follow rename. A local variable in vm_stab is also renamed. The error message in this function still says "function ... not defined"; that word will be replaced by a parameter in a later commit. --- vm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vm.c b/vm.c index a4d24ce0..4c66309d 100644 --- a/vm.c +++ b/vm.c @@ -75,8 +75,8 @@ struct vm_desc { }; struct vm_stent { - val fb; - loc fbloc; + val bind; + loc bindloc; }; struct vm_env { @@ -224,7 +224,7 @@ static void vm_desc_mark(val obj) gc_mark(vd->symvec); for (i = 0; i < stsz; i++) - gc_mark(vd->stab[i].fb); + gc_mark(vd->stab[i].bind); } static struct vm_closure *vm_closure_struct(val obj) @@ -495,17 +495,17 @@ static loc vm_stab(struct vm *vm, unsigned fun) { struct vm_desc *vd = vm->vd; struct vm_stent *fe = &vd->stab[fun]; - loc fbloc = fe->fbloc; + loc bindloc = fe->bindloc; - if (!nullocp(fbloc)) - return fbloc; + if (!nullocp(bindloc)) + return bindloc; - if (nilp(fe->fb = lookup_fun(nil, vecref(vd->symvec, num_fast(fun))))) + if (nilp(fe->bind = lookup_fn(nil, vecref(vd->symvec, num_fast(fun))))) eval_error(vd->bytecode, lit("function ~s is not defined"), vecref(vd->symvec, num(fun)), nao); gc_mutated(vd->self); - return (fe->fbloc = cdr_l(fe->fb)); + return (fe->bindloc = cdr_l(fe->bind)); } NOINLINE static void vm_gcall(struct vm *vm, vm_word_t insn) @@ -1111,8 +1111,8 @@ void vm_invalidate_binding(val sym) for (i = 0; i < vd->stsz; i++) { if (vecref(vd->symvec, num_fast(i)) == sym) { struct vm_stent *sti = &vd->stab[i]; - sti->fb = nil; - sti->fbloc = nulloc; + sti->bind = nil; + sti->bindloc = nulloc; } } } -- cgit v1.2.3