mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2025-12-05 18:30:24 -08:00
cmp: change handling of *cmp-env-root*
Due to the recent introduction of cross compilation features, *cmp-env* has to contain type information throughout the entire compilation (not only while we are compiling a form) so that (typep x type *cmp-env*) works correctly. Therefore, we can't set *cmp-env* to nil initially as we did previously. Instead, we set *cmp-env* to *cmp-env-root* initially.
This commit is contained in:
parent
79d33bdd83
commit
c5f6cd0246
4 changed files with 5 additions and 7 deletions
|
|
@ -231,7 +231,7 @@ be deleted if they have been opened with LoadLibrary.")
|
|||
(*callbacks* nil)
|
||||
(*functions* nil)
|
||||
(*cmp-env-root* (copy-tree *cmp-env-root*))
|
||||
(*cmp-env* nil)
|
||||
(*cmp-env* *cmp-env-root*)
|
||||
(*load-objects* (make-hash-table :size 128 :test #'equal))
|
||||
(*make-forms* nil)
|
||||
(*referenced-objects* (make-array 256 :adjustable t :fill-pointer 0))
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ after compilation."
|
|||
(*cmp-env-root* *cmp-env-root*))
|
||||
|
||||
(with-compiler-env (compiler-conditions)
|
||||
(setf form (set-closure-env form lexenv *cmp-env-root*))
|
||||
(setf form (set-closure-env form lexenv *cmp-env*))
|
||||
(compiler-pass1 form)
|
||||
(compiler-pass/propagate-types)
|
||||
(let (#+(or mingw32 msvc cygwin)(*self-destructing-fasl* t))
|
||||
|
|
@ -297,7 +297,7 @@ from the C language code. NIL means \"do not create the file\"."
|
|||
(*cmp-env-root* *cmp-env-root*))
|
||||
(with-compiler-env (compiler-conditions)
|
||||
(with-cxx-env ()
|
||||
(setf disassembled-form (set-closure-env disassembled-form lexenv *cmp-env-root*))
|
||||
(setf disassembled-form (set-closure-env disassembled-form lexenv *cmp-env*))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(setf (symbol-function 'T3FUNCTION)
|
||||
|
|
|
|||
|
|
@ -11,9 +11,7 @@
|
|||
|
||||
(defun t1expr (form)
|
||||
(let* ((*current-toplevel-form* nil)
|
||||
(*cmp-env* (if *cmp-env*
|
||||
(cmp-env-copy *cmp-env*)
|
||||
(cmp-env-root))))
|
||||
(*cmp-env* (cmp-env-copy *cmp-env*)))
|
||||
(push (t1expr* form) *top-level-forms*)))
|
||||
|
||||
(defvar *toplevel-forms-to-print*
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
(compiler-error #'handle-compiler-error)
|
||||
(serious-condition #'handle-compiler-internal-error))
|
||||
(mp:with-lock (mp:+load-compile-lock+)
|
||||
(let ,+init-env-form+
|
||||
(let* ,+init-env-form+
|
||||
(with-compilation-unit ()
|
||||
,@body))))
|
||||
(abort ()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue