Skip to content
Snippets Groups Projects
Commit 81a47b76 authored by ram's avatar ram
Browse files

Added code to CONVERT-AND-MAYBE-COMPILER to place the current value

of *DEFAULT-COOKIE* in the *LEXICAL-ENVIRONMENT* so that the global
value takes effect within that form even if it is different than the
one in effect at the start of the compilation.
In PROCESS-FORM, fixed the processing of package-frobbing forms to
stop out-of-order execution problems.
parent edaa9e08
No related branches found
No related tags found
No related merge requests found
...@@ -682,10 +682,16 @@ ...@@ -682,10 +682,16 @@
;;; compile something. If *BLOCK-COMPILE* is true, then we still convert the ;;; compile something. If *BLOCK-COMPILE* is true, then we still convert the
;;; form, but delay compilation, pushing the result on *TOP-LEVEL-LAMBDAS* ;;; form, but delay compilation, pushing the result on *TOP-LEVEL-LAMBDAS*
;;; instead. ;;; instead.
;;;
;;; The *DEFAULT-COOKIE* at this time becomes the default policy for
;;; compiling the form. Any enclosed PROCLAIMs will affect only subsequent
;;; forms.
;;; ;;;
(defun convert-and-maybe-compile (form path object) (defun convert-and-maybe-compile (form path object)
(declare (list path) (type object object)) (declare (list path) (type object object))
(let ((tll (ir1-top-level form path nil))) (let* ((*lexical-environment*
(make-lexenv :cookie *default-cookie*))
(tll (ir1-top-level form path nil)))
(cond (*block-compile* (push tll *top-level-lambdas*)) (cond (*block-compile* (push tll *top-level-lambdas*))
(t (t
(compile-top-level (list tll) object) (compile-top-level (list tll) object)
...@@ -755,8 +761,11 @@ ...@@ -755,8 +761,11 @@
unexport use-package unuse-package import) unexport use-package unuse-package import)
(eval form) (eval form)
(etypecase object (etypecase object
(fasl-file (fasl-dump-cold-load-form form object)) (fasl-file
((or null core-object)))) (compile-top-level-lambdas () t object)
(fasl-dump-cold-load-form form object))
((or null core-object)
(convert-and-maybe-compile form path object))))
((eval-when) ((eval-when)
(unless (>= (length form) 2) (unless (>= (length form) 2)
(compiler-error "EVAL-WHEN form is too short: ~S." form)) (compiler-error "EVAL-WHEN form is too short: ~S." form))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment