From 4fc0d2118f3b25dfa852ac6aadee83ddf9cc330a Mon Sep 17 00:00:00 2001
From: dos-reis <gdr@axiomatics.org>
Date: Mon, 20 Aug 2012 04:29:01 +0000
Subject: 	* interp/util.lisp (BUILD-INTERPSYS): loadDelayedFFI early. 
 * interp/sys-driver.boot (%sysInit): Do not call 	sys-osInitCLispFFI (no
 longer necessary.) 	* boot/translator.boot (genModuleFinalization):
 Generate forms to 	be evaluated at load and execution time, instead of a
 function call. 	* interp/spad.lisp (process): Remove.

---
 src/boot/strap/translator.clisp | 96 ++++++++++++++++++++---------------------
 1 file changed, 46 insertions(+), 50 deletions(-)

(limited to 'src/boot/strap')

diff --git a/src/boot/strap/translator.clisp b/src/boot/strap/translator.clisp
index 11759bc9..c681da73 100644
--- a/src/boot/strap/translator.clisp
+++ b/src/boot/strap/translator.clisp
@@ -35,56 +35,52 @@
              (|coreError| "current module has no name"))
             (T
              (SETQ |init|
-                     (CONS 'DEFUN
-                           (CONS
-                            (INTERN
-                             (CONCAT |$currentModuleName| "InitCLispFFI"))
-                            (CONS NIL
-                                  (CONS
-                                   (LIST 'MAPC (LIST 'FUNCTION 'FMAKUNBOUND)
-                                         (|quote|
-                                          (LET ((|bfVar#2| NIL)
-                                                (|bfVar#3| NIL)
-                                                (|bfVar#1|
-                                                 |$foreignsDefsForCLisp|)
-                                                (|d| NIL))
-                                            (LOOP
-                                             (COND
-                                              ((OR (NOT (CONSP |bfVar#1|))
-                                                   (PROGN
-                                                    (SETQ |d| (CAR |bfVar#1|))
-                                                    NIL))
-                                               (RETURN |bfVar#2|))
-                                              ((NULL |bfVar#2|)
-                                               (SETQ |bfVar#2|
-                                                       #1=(CONS (CADR |d|)
-                                                                NIL))
-                                               (SETQ |bfVar#3| |bfVar#2|))
-                                              (T (RPLACD |bfVar#3| #1#)
-                                               (SETQ |bfVar#3|
-                                                       (CDR |bfVar#3|))))
-                                             (SETQ |bfVar#1|
-                                                     (CDR |bfVar#1|))))))
-                                   (LET ((|bfVar#5| NIL)
-                                         (|bfVar#6| NIL)
-                                         (|bfVar#4| |$foreignsDefsForCLisp|)
-                                         (|d| NIL))
-                                     (LOOP
-                                      (COND
-                                       ((OR (NOT (CONSP |bfVar#4|))
-                                            (PROGN
-                                             (SETQ |d| (CAR |bfVar#4|))
-                                             NIL))
-                                        (RETURN |bfVar#5|))
-                                       ((NULL |bfVar#5|)
-                                        (SETQ |bfVar#5|
-                                                #2=(CONS
-                                                    (LIST 'EVAL (|quote| |d|))
-                                                    NIL))
-                                        (SETQ |bfVar#6| |bfVar#5|))
-                                       (T (RPLACD |bfVar#6| #2#)
-                                        (SETQ |bfVar#6| (CDR |bfVar#6|))))
-                                      (SETQ |bfVar#4| (CDR |bfVar#4|)))))))))
+                     (LIST 'EVAL-WHEN (LIST :LOAD-TOPLEVEL :EXECUTE)
+                           (CONS 'PROGN
+                                 (CONS
+                                  (LIST 'MAPC (LIST 'FUNCTION 'FMAKUNBOUND)
+                                        (|quote|
+                                         (LET ((|bfVar#2| NIL)
+                                               (|bfVar#3| NIL)
+                                               (|bfVar#1|
+                                                |$foreignsDefsForCLisp|)
+                                               (|d| NIL))
+                                           (LOOP
+                                            (COND
+                                             ((OR (NOT (CONSP |bfVar#1|))
+                                                  (PROGN
+                                                   (SETQ |d| (CAR |bfVar#1|))
+                                                   NIL))
+                                              (RETURN |bfVar#2|))
+                                             ((NULL |bfVar#2|)
+                                              (SETQ |bfVar#2|
+                                                      #1=(CONS (CADR |d|) NIL))
+                                              (SETQ |bfVar#3| |bfVar#2|))
+                                             (T (RPLACD |bfVar#3| #1#)
+                                              (SETQ |bfVar#3|
+                                                      (CDR |bfVar#3|))))
+                                            (SETQ |bfVar#1|
+                                                    (CDR |bfVar#1|))))))
+                                  (LET ((|bfVar#5| NIL)
+                                        (|bfVar#6| NIL)
+                                        (|bfVar#4| |$foreignsDefsForCLisp|)
+                                        (|d| NIL))
+                                    (LOOP
+                                     (COND
+                                      ((OR (NOT (CONSP |bfVar#4|))
+                                           (PROGN
+                                            (SETQ |d| (CAR |bfVar#4|))
+                                            NIL))
+                                       (RETURN |bfVar#5|))
+                                      ((NULL |bfVar#5|)
+                                       (SETQ |bfVar#5|
+                                               #2=(CONS
+                                                   (LIST 'EVAL (|quote| |d|))
+                                                   NIL))
+                                       (SETQ |bfVar#6| |bfVar#5|))
+                                      (T (RPLACD |bfVar#6| #2#)
+                                       (SETQ |bfVar#6| (CDR |bfVar#6|))))
+                                     (SETQ |bfVar#4| (CDR |bfVar#4|))))))))
              (|reallyPrettyPrint| |init| |stream|))))
      (T NIL))))
 
-- 
cgit v1.2.3