diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-04-21 19:14:28 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-04-21 19:14:28 -0700 |
commit | bf04eaba827dad559b85c36d38a180462f69578b (patch) | |
tree | 8b29d88dfd07ddf08efd885ee607f3f243b2d8b7 | |
parent | f1ef1582cd32d3cc148de64921844cf61408535a (diff) | |
download | txr-bf04eaba827dad559b85c36d38a180462f69578b.tar.gz txr-bf04eaba827dad559b85c36d38a180462f69578b.tar.bz2 txr-bf04eaba827dad559b85c36d38a180462f69578b.zip |
compiler: bug: const-folded (call ...) not quoted.
* share/txr/stdlib/compiler.tl (comp-apply-call): When a call
expression is evaluated at compile time, we must quote the
result, because it could be a non-self-evaluating symbol,
or list.
-rw-r--r-- | share/txr/stdlib/compiler.tl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl index 127d68af..990395cb 100644 --- a/share/txr/stdlib/compiler.tl +++ b/share/txr/stdlib/compiler.tl @@ -1383,7 +1383,7 @@ (let ((op (eval (car args)))) (or [%const-foldable% op] (not (bindable op))))) - me.(compile oreg env (eval form))) + me.(compile oreg env ^(quote ,(eval form)))) (t (tree-case (car args) ((op arg . more) (caseq op |