From 3ce8999b2cc9c2aa04805141af9cb449d92fa89e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 3 Apr 2018 20:07:30 -0700 Subject: compiler: first cut compile-file implementation. * lisplib.c (compiler_set_entries): Autoload on compile-file. * parser.c (parse_init): Expose get-parser, parser-errors and parser-eof intrinsics in system package. * share/txr/stdlib/compiler.tl (compiler): Wrap defstruct form in compile-only. What this means is that when we invoke comile-file on compiler.tl, the compiler will only compile this defstruct and not evaluate it. I.e. it will not try to redefine the structure. Redefining the core structure of the compiler while it is compiling itself wreaks havoc on the compilation. (%fille-suff-rx%, *emit*, *eval*): New variables. (open-compile-streams, list-from-vm-desc, usr:compile-file): New functions. * vm.c (vm_desc_nlevels, vm_desc_nregs): New static functions. (vm_init): Register new intrinsics vm-desc-nlevels and vn-desc-nregs in system package. --- lisplib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisplib.c') diff --git a/lisplib.c b/lisplib.c index a7250185..47213227 100644 --- a/lisplib.c +++ b/lisplib.c @@ -658,7 +658,7 @@ static val compiler_set_entries(val dlt, val fun) nil }; val name[] = { - lit("compile-toplevel"), + lit("compile-toplevel"), lit("compile-file"), nil }; -- cgit v1.2.3