diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-17 08:51:00 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-17 08:51:00 -0700 |
commit | 0f7a74aa02bc9deb2ae269113e565a63b6f64bd2 (patch) | |
tree | bf3788a2d8a08a64b21cadd2efe2e1243852d44e | |
parent | a0f18bf76682b4c49f7fb66bdbdcb4dad23483ec (diff) | |
download | txr-0f7a74aa02bc9deb2ae269113e565a63b6f64bd2.tar.gz txr-0f7a74aa02bc9deb2ae269113e565a63b6f64bd2.tar.bz2 txr-0f7a74aa02bc9deb2ae269113e565a63b6f64bd2.zip |
compile-toplevel: expand with warnings.
* eval.c (eval_init): Expose raw expand function as
sys:expand*, since sys:expand squelches warnings.
* share/txr/stdlib/compiler.tl (usr:compile-toplevel): Use
expand* instead of expand.
-rw-r--r-- | eval.c | 1 | ||||
-rw-r--r-- | share/txr/stdlib/compiler.tl | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -6244,6 +6244,7 @@ void eval_init(void) reg_var(load_path_s, nil); reg_symacro(intern(lit("self-load-path"), user_package), load_path_s); reg_fun(intern(lit("expand"), system_package), func_n2o(no_warn_expand, 1)); + reg_fun(intern(lit("expand*"), system_package), func_n2o(expand, 1)); reg_fun(intern(lit("expand-with-free-refs"), system_package), func_n3o(expand_with_free_refs, 1)); reg_fun(intern(lit("macro-form-p"), user_package), func_n2o(macro_form_p, 1)); diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl index adf85e37..e10bf1a7 100644 --- a/share/txr/stdlib/compiler.tl +++ b/share/txr/stdlib/compiler.tl @@ -483,6 +483,6 @@ (defun usr:compile-toplevel (exp) (let ((co (new compiler)) (as (new assembler))) - (let ((frag co.(compile (new env) (expand exp)))) + (let ((frag co.(compile (new env) (expand* exp)))) as.(asm ^(,*frag.code (end ,frag.oreg))) (vm-make-desc co.nlev co.nreg as.buf co.(get-datavec))))) |