aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/boot/strap/translator.clisp96
-rw-r--r--src/boot/translator.boot9
-rw-r--r--src/interp/spad.lisp7
-rw-r--r--src/interp/sys-driver.boot2
-rw-r--r--src/interp/util.lisp2
6 files changed, 61 insertions, 64 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8fe7c4e4..4004f4b7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,14 @@
2012-08-19 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * 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.
+
+2012-08-19 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* lisp/core.lisp.in (primitiveLoad): New. Export.
($delayedFFI): Likewise.
* lisp/Makefile.in (oa_delay_ffi): New.
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))))
diff --git a/src/boot/translator.boot b/src/boot/translator.boot
index 7f347cdc..5ade6ce3 100644
--- a/src/boot/translator.boot
+++ b/src/boot/translator.boot
@@ -58,10 +58,11 @@ genModuleFinalization(stream) ==
$currentModuleName = nil =>
coreError '"current module has no name"
init :=
- ["DEFUN", makeSymbol strconc($currentModuleName,'"InitCLispFFI"), nil,
- ["MAPC",["FUNCTION", "FMAKUNBOUND"],
- quote [second d for d in $foreignsDefsForCLisp]],
- :[["EVAL",quote d] for d in $foreignsDefsForCLisp]]
+ ["EVAL-WHEN", [KEYWORD::LOAD_-TOPLEVEL,KEYWORD::EXECUTE],
+ ["PROGN",
+ ["MAPC",["FUNCTION", "FMAKUNBOUND"],
+ quote [second d for d in $foreignsDefsForCLisp]],
+ :[["EVAL",quote d] for d in $foreignsDefsForCLisp]]]
reallyPrettyPrint(init,stream)
nil
diff --git a/src/interp/spad.lisp b/src/interp/spad.lisp
index d8dd240c..af99796c 100644
--- a/src/interp/spad.lisp
+++ b/src/interp/spad.lisp
@@ -149,13 +149,6 @@
(MAKEPROP 'END_UNIT 'KEY T)
-(defun |process| (x)
- (COND ((NOT (EQ TOK 'END_UNIT))
- (SETQ DEBUGMODE 'NO)
- (SPAD_SYNTAX_ERROR)
- (if |$InteractiveMode| (|spadThrow|))
- (|translateSpad| x))))
-
(defmacro try (X)
`(LET ((|$autoLine|))
(declare (special |$autoLine|))
diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot
index f38fb0fc..d8f3ed37 100644
--- a/src/interp/sys-driver.boot
+++ b/src/interp/sys-driver.boot
@@ -63,8 +63,6 @@ symbolFunction('%sysInit) := () +->
SETQ(_*LOAD_-VERBOSE_*,false)
initMemoryConfig()
)if %hasFeature KEYWORD::CLISP
- -- a goat for CLisp FFI, please.
- sys_-osInitCLispFFI()
-- Tell CLISP to stop being anal retentive, please.
SETF(CUSTOM::_*WARN_-ON_-FLOATING_-POINT_-CONTAGION_*,false)
)endif
diff --git a/src/interp/util.lisp b/src/interp/util.lisp
index fd9349d9..f4ef0187 100644
--- a/src/interp/util.lisp
+++ b/src/interp/util.lisp
@@ -247,9 +247,9 @@
(defun build-interpsys ()
(reroot)
+ (|loadDelayedFFI|)
(|resetWorkspaceVariables|)
(|AxiomCore|::|%sysInit|)
- (|loadDelayedFFI|)
(|buildHtMacroTable|)
(|initHist|)
(|initNewWorld|)