diff options
author | dcs <dcs@FreeBSD.org> | 2000-06-07 21:57:23 +0000 |
---|---|---|
committer | dcs <dcs@FreeBSD.org> | 2000-06-07 21:57:23 +0000 |
commit | cf59a851138b8211a65442ed28cd9671649724b8 (patch) | |
tree | 85fd2ee9a6b4a89b9ed5320b8290156105f066f5 /sys/boot/common | |
parent | 614d07d7f485d72bcacf28f0f3f0c00e5373d6d0 (diff) | |
download | FreeBSD-src-cf59a851138b8211a65442ed28cd9671649724b8.zip FreeBSD-src-cf59a851138b8211a65442ed28cd9671649724b8.tar.gz |
Place original builtins in a vocabulary called "builtins". This
is intended mainly for debuging purposes, but it can be used by
other words if done carefully.
Diffstat (limited to 'sys/boot/common')
-rw-r--r-- | sys/boot/common/interp_forth.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/boot/common/interp_forth.c b/sys/boot/common/interp_forth.c index 8349898..fa7925a 100644 --- a/sys/boot/common/interp_forth.c +++ b/sys/boot/common/interp_forth.c @@ -235,15 +235,21 @@ bf_init(void) ficlInitSystem(10000); /* Default dictionary ~4000 cells */ bf_vm = ficlNewVM(); + /* Put all private definitions in a "builtins" vocabulary */ + ficlExec(bf_vm, "vocabulary builtins also builtins definitions"); + /* Builtin constructor word */ ficlExec(bf_vm, BUILTIN_CONSTRUCTOR); /* make all commands appear as Forth words */ SET_FOREACH(cmdp, Xcommand_set) { ficlBuild((*cmdp)->c_name, bf_command, FW_DEFAULT); + ficlExec(bf_vm, "also forth definitions"); sprintf(create_buf, "builtin: %s", (*cmdp)->c_name); ficlExec(bf_vm, create_buf); + ficlExec(bf_vm, "previous definitions"); } + ficlExec(bf_vm, "only forth definitions"); /* Export some version numbers so that code can detect the loader/host version */ ficlSetEnv("FreeBSD_version", __FreeBSD_version); |