summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-19 22:06:07 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-19 22:06:07 -0700
commitf0b797d9b99951d9b08bd0c0bddff283401703ec (patch)
tree78c17b1cf7d4e9fd603aadf745be0e4f12fccf32
parentfa4fda0e8af76ca3cdf435c0aa186210a4e18d03 (diff)
downloadtxr-f0b797d9b99951d9b08bd0c0bddff283401703ec.tar.gz
txr-f0b797d9b99951d9b08bd0c0bddff283401703ec.tar.bz2
txr-f0b797d9b99951d9b08bd0c0bddff283401703ec.zip
compiler: dump warnings from form expansion.
* share/txr/stdlib/compiler.tl (usr:compile-toplevel): Call release-deferred-warnings to dump accumulated warnings. Otherwise when we are working in the listener, the pent-up warnings get dumped in relation to the next input line.
-rw-r--r--share/txr/stdlib/compiler.tl4
1 files changed, 3 insertions, 1 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index 24d64fc1..d02e8aee 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -503,6 +503,8 @@
(let ((co (new compiler))
(as (new assembler)))
(let* ((oreg co.(alloc-treg))
- (frag co.(compile oreg (new env co co) (expand* exp))))
+ (xexp (prog1 (expand* exp) (unless *load-recursive*
+ (release-deferred-warnings))))
+ (frag co.(compile oreg (new env co co) xexp)))
as.(asm ^(,*frag.code (end ,frag.oreg)))
(vm-make-desc co.nlev co.nreg as.buf co.(get-datavec) co.(get-funvec)))))