summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-03-30 06:39:16 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-03-30 06:39:16 -0700
commitdb7a58ce5fe476c17dca572902d22fc660e6e401 (patch)
treefc82af520e4d93117e03096084fef24f04695b4a
parent51966392c0724fa41fd1c337ec50c0c8c550cd0f (diff)
downloadtxr-db7a58ce5fe476c17dca572902d22fc660e6e401.tar.gz
txr-db7a58ce5fe476c17dca572902d22fc660e6e401.tar.bz2
txr-db7a58ce5fe476c17dca572902d22fc660e6e401.zip
compiler: incorrect self-check in spy framework.
* share/txr/stdlib/compiler.tl (compiler (pop-closure-spy, pop-access-spy)): The stack underflow checkt must be done by checking top, not the incoming spy argument.
-rw-r--r--share/txr/stdlib/compiler.tl4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index 9cc0aa07..0f2ad9de 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -454,7 +454,7 @@
(defmeth compiler pop-closure-spy (me spy)
(let ((top (pop me.closure-spies)))
- (unless spy
+ (unless top
(error "closure spy stack bug in compiler"))
(unless (eq top spy)
(error "closure spy stack balance problem in compiler"))))
@@ -464,7 +464,7 @@
(defmeth compiler pop-access-spy (me spy)
(let ((top (pop me.access-spies)))
- (unless spy
+ (unless top
(error "access spy stack bug in compiler"))
(unless (eq top spy)
(error "access spy stack balance problem in compiler"))))