summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-10-22 22:46:27 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-10-22 22:46:27 -0700
commit4f6bca5f84d8d73a7ef0c6a7fff8c634abf99224 (patch)
tree2f3f91998ef50e18c9295633b35f4a76c5541883
parent3ba9e000be0fce529a254371f2e347f73a14723c (diff)
downloadtxr-4f6bca5f84d8d73a7ef0c6a7fff8c634abf99224.tar.gz
txr-4f6bca5f84d8d73a7ef0c6a7fff8c634abf99224.tar.bz2
txr-4f6bca5f84d8d73a7ef0c6a7fff8c634abf99224.zip
compiler: fix failing load-time tests.
* stdlib/compiler.tl (usr:compile-toplevel): Do not bind *load-time* to t at the top level. The idea behind this binding was to treat load-time as a transparent form that does nothing if it occurs in the top-level since the top-level is already at load-time. However, this is problematic because it breaks the expectation that load-time calculations are factored out of a form and done prior to its evaluation, even if that form is top-level.
-rw-r--r--stdlib/compiler.tl3
1 files changed, 1 insertions, 2 deletions
diff --git a/stdlib/compiler.tl b/stdlib/compiler.tl
index 7756e98e..19dbf260 100644
--- a/stdlib/compiler.tl
+++ b/stdlib/compiler.tl
@@ -2105,8 +2105,7 @@
(as (new assembler))
(*dedup* (or *dedup* (hash)))
(*opt-level* (or *opt-level* 0)))
- (let* ((*load-time* t)
- (oreg co.(alloc-treg))
+ (let* ((oreg co.(alloc-treg))
(xexp (if expanded-p
exp
(unwind-protect