summaryrefslogtreecommitdiffstats
path: root/stdlib/compiler.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-03-31 01:16:29 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-03-31 01:16:29 -0700
commita25d1e1b5a99afe4696cd7cb6add77a94ec39ad4 (patch)
tree47bc0dc2427edd1a439775f14058861bb3d08553 /stdlib/compiler.tl
parent687db4b84ecfd9733b67a50293de6f41f311a042 (diff)
downloadtxr-a25d1e1b5a99afe4696cd7cb6add77a94ec39ad4.tar.gz
txr-a25d1e1b5a99afe4696cd7cb6add77a94ec39ad4.tar.bz2
txr-a25d1e1b5a99afe4696cd7cb6add77a94ec39ad4.zip
compiler: package-manipulating top-level forms bug.
* stdlib/compiler.tl (compile-file-conditionally): Recognize a potential package-manipulating form not checking whether its main operator is in %pakage-manip% list, but whether any global functions that its compiled image references are in that list. This is the same approach that is used in dump-compiled-objects. This fix is needed for correctly recognizing defpackage as a package-manipulating form. defpackage macro-expands to a let form which contains a call to make-package. Testing whether let is in %package-manip% is useless; of course it isn't, and the test overlooks make-package.
Diffstat (limited to 'stdlib/compiler.tl')
-rw-r--r--stdlib/compiler.tl3
1 files changed, 2 insertions, 1 deletions
diff --git a/stdlib/compiler.tl b/stdlib/compiler.tl
index 63ceb519..585712f9 100644
--- a/stdlib/compiler.tl
+++ b/stdlib/compiler.tl
@@ -2361,7 +2361,8 @@
(not (constantp form)))
(let* ((vm-desc (compile-toplevel form))
(flat-vd (list-from-vm-desc vm-desc))
- (fence (member sym %package-manip%)))
+ (symvec (sys:vm-desc-symvec vm-desc))
+ (fence (isecp symvec %package-manip%)))
(when *eval*
(let ((pa *package-alist*))
(sys:vm-execute-toplevel vm-desc)