From a25d1e1b5a99afe4696cd7cb6add77a94ec39ad4 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 31 Mar 2022 01:16:29 -0700 Subject: 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. --- stdlib/compiler.tl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stdlib/compiler.tl') 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) -- cgit v1.2.3