From 968f50d637b31dadb38f7b6a7b3ea1bd8f5879c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Wed, 24 Apr 2013 23:45:03 +0100 Subject: [PATCH] Revert "Reduce 80% bootstrap time" We need to convert symbols before dumping This reverts commit c37aaa1d28f24111969fd196adfa27263a3b63ec. --- ecmalisp.lisp | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/ecmalisp.lisp b/ecmalisp.lisp index 4ddbb86..cdd3a19 100644 --- a/ecmalisp.lisp +++ b/ecmalisp.lisp @@ -1376,12 +1376,7 @@ name type value - declarations - ;; This slot is using during bootstrapping in order to speed up the - ;; compilation time. The reason is we store the macro expanders as - ;; lists, but we do not want to compile the definition multiple - ;; times. - #+common-lisp cache) + declarations) (def!struct lexenv variable @@ -2794,22 +2789,17 @@ (let ((macro-binding (macro (car form)))) (if macro-binding (let ((expander (binding-value macro-binding))) - (cond - #+common-lisp - ((binding-cache macro-binding) - (setq expander (binding-cache macro-binding))) - ((listp expander) - (let ((compiled (eval expander))) - ;; The list representation are useful while - ;; bootstrapping, as we can dump the definition of the - ;; macros easily, but they are slow because we have to - ;; evaluate them and compile them now and again. So, let - ;; us replace the list representation version of the - ;; function with the compiled one. - ;; - #+ecmalisp (setf (binding-value macro-binding) compiled) - #+common-lisp (setf (binding-cache macro-binding) compiled) - (setq expander compiled)))) + (when (listp expander) + (let ((compiled (eval expander))) + ;; The list representation are useful while + ;; bootstrapping, as we can dump the definition of the + ;; macros easily, but they are slow because we have to + ;; evaluate them and compile them now and again. So, let + ;; us replace the list representation version of the + ;; function with the compiled one. + ;; + #+ecmalisp (setf (binding-value macro-binding) compiled) + (setq expander compiled))) (values (apply expander (cdr form)) t)) (values form nil)))) (t -- 1.7.10.4