summaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-10-26 06:35:59 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-10-26 06:35:59 -0700
commit0b0ef7806b96292ad11378dad7f9c6ae8274ad71 (patch)
tree776e39bd5754bea15dac1ea117724a80ed5bac2c /vm.c
parent576ec088fb62291c1f431873d39d26d508d2a18c (diff)
downloadtxr-0b0ef7806b96292ad11378dad7f9c6ae8274ad71.tar.gz
txr-0b0ef7806b96292ad11378dad7f9c6ae8274ad71.tar.bz2
txr-0b0ef7806b96292ad11378dad7f9c6ae8274ad71.zip
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.
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c20
1 files 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;
}
}
}