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
commit7fec98c58e2c5db307ee50f75bf60fdf47fd4114 (patch)
treefc82af520e4d93117e03096084fef24f04695b4a
parent6a7c9e039b7f3ce3226d896c5dc69124c0b16f21 (diff)
downloadtxr-7fec98c58e2c5db307ee50f75bf60fdf47fd4114.tar.gz
txr-7fec98c58e2c5db307ee50f75bf60fdf47fd4114.tar.bz2
txr-7fec98c58e2c5db307ee50f75bf60fdf47fd4114.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"))))