Move load forms closer to the first reference to the externalizable object they build.

This commit is contained in:
jgarcia 2006-10-24 22:06:47 +00:00
parent 2b8e92658e
commit ffe789a498
2 changed files with 10 additions and 1 deletions

View file

@ -123,6 +123,11 @@ ECL 1.0:
- Minimized the number of headers included by ecl/ecl.h. In particular,
stdio.h, inittypes.h and pthread.h are no longer used.
- When a compiler finds a literal standard object, the load and initialization
forms it generates are now closer to the first reference to the object. This
allows to have, in the same file, a class definition and a constant which
is an object of that class.
* Contributed code:
- New examples: cmdline/ls.lsp, ffi/uffi.lsp

View file

@ -428,7 +428,11 @@
(defun add-load-time-values ()
(when (listp *load-time-values*)
(setq *top-level-forms* (nconc *load-time-values* *top-level-forms*))
(setq *load-time-values* nil)))
(setq *load-time-values* nil))
(when (listp *make-forms*)
(setq *top-level-forms*
(nconc (nreverse *make-forms*) *top-level-forms*))
(setq *make-forms* nil)))
(defun c1load-time-value (args)
(check-args-number 'LOAD-TIME-VALUE args 1 2)