aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-08-17 03:50:35 +0000
committerdos-reis <gdr@axiomatics.org>2008-08-17 03:50:35 +0000
commitffb91646c6f11e84fa886aa5abc2de61ba291cc1 (patch)
tree6381e1c610ffeed10f6705524ad577bb7d3cfa01 /src/interp
parent424c4295242245f3232f6171ab2fffca2c248935 (diff)
downloadopen-axiom-ffb91646c6f11e84fa886aa5abc2de61ba291cc1.tar.gz
* interp/sys-driver.boot (openDatabases): Rename from RESTART0.
(initializeGlobalState): Tidy. (executeSpadScript): Don't display start up messages. (compileSpadLibrary): Likewise. (buildDatabasesHandler): Likewise. (systemMain): Initialize global states. * interp/nrunfast.boot: Defin $NRTvec, $monitorNewWorld. * interp/daase.lisp (|fillDatabasesInCore|): Rename from RESETHASHTABLES. (|closeAllDatabaseStreams|): Rename from closeAllDatabases * interp/util.lisp (build-interpsys): Initialize macro table. * interp/htcheck.boot: Don't initialize macro table here.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/Makefile.in2
-rw-r--r--src/interp/Makefile.pamphlet2
-rw-r--r--src/interp/daase.lisp4
-rw-r--r--src/interp/htcheck.boot4
-rw-r--r--src/interp/nrunfast.boot6
-rw-r--r--src/interp/sys-driver.boot68
-rw-r--r--src/interp/util.lisp5
7 files changed, 75 insertions, 16 deletions
diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in
index 67f93d18..3563e592 100644
--- a/src/interp/Makefile.in
+++ b/src/interp/Makefile.in
@@ -190,7 +190,7 @@ makeint.lisp: Makefile
@ echo '(in-package "BOOT")' >> makeint.lisp
@ touch ${TIMESTAMP}
@ echo '${YEARWEEK}' >> makeint.lisp
- @ echo '(unless (|%basicSystemIsComplete|) (build-interpsys (quote ($(patsubst %, "%", ${TRANOBJS}))) (quote ($(patsubst %, "%", ${ASAUTO}))))(|clearClams|))' >> makeint.lisp
+ @ echo '(unless (or |$$StandardLinking| (|%basicSystemIsComplete|)) (build-interpsys (quote ($(patsubst %, "%", ${TRANOBJS}))) (quote ($(patsubst %, "%", ${ASAUTO}))))(|clearClams|))' >> makeint.lisp
@ echo '#+:akcl (setq compiler::*suppress-compiler-notes* t)' >> makeint.lisp
@ echo '#+:akcl (si::gbc-time 0)' >> makeint.lisp
@ echo '#+:GCL (si::gbc t)' >> makeint.lisp
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet
index 1f41f3e7..7f159117 100644
--- a/src/interp/Makefile.pamphlet
+++ b/src/interp/Makefile.pamphlet
@@ -343,7 +343,7 @@ makeint.lisp: Makefile
@ echo '(in-package "BOOT")' >> makeint.lisp
@ touch ${TIMESTAMP}
@ echo '${YEARWEEK}' >> makeint.lisp
- @ echo '(unless (|%basicSystemIsComplete|) (build-interpsys (quote ($(patsubst %, "%", ${TRANOBJS}))) (quote ($(patsubst %, "%", ${ASAUTO}))))(|clearClams|))' >> makeint.lisp
+ @ echo '(unless (or |$$StandardLinking| (|%basicSystemIsComplete|)) (build-interpsys (quote ($(patsubst %, "%", ${TRANOBJS}))) (quote ($(patsubst %, "%", ${ASAUTO}))))(|clearClams|))' >> makeint.lisp
@ echo '#+:akcl (setq compiler::*suppress-compiler-notes* t)' >> makeint.lisp
@ echo '#+:akcl (si::gbc-time 0)' >> makeint.lisp
@ echo '#+:GCL (si::gbc t)' >> makeint.lisp
diff --git a/src/interp/daase.lisp b/src/interp/daase.lisp
index b422cf01..d0ce7826 100644
--- a/src/interp/daase.lisp
+++ b/src/interp/daase.lisp
@@ -333,14 +333,14 @@
(list flags file)))
-(defun |closeAllDatabases| nil
+(defun |closeAllDatabaseStreams| nil
(close *interp-stream*)
(close *operation-stream*)
(close *category-stream*)
(close *browse-stream*))
-(defun resethashtables ()
+(defun |fillDatabasesInCore| nil
"set all -hash* to clean values. used to clean up core before saving system"
(setq *hascategory-hash* (make-hash-table :test #'equal))
(setq *operation-hash* (make-hash-table))
diff --git a/src/interp/htcheck.boot b/src/interp/htcheck.boot
index cd4639cb..978a0eb5 100644
--- a/src/interp/htcheck.boot
+++ b/src/interp/htcheck.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007, Gabriel Dos Reis.
+-- Copyright (C) 2007-2008, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -129,5 +129,3 @@ spadSysBranch(tree,arg) == --tree is (msg kind TREEorSomethingElse ...)
kind = 'INTEGER => INTEGERP arg
kind = 'FUNCTION => atom arg
systemError '"unknown tree branch"
-
-buildHtMacroTable()
diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot
index 876844ab..2b5f55b8 100644
--- a/src/interp/nrunfast.boot
+++ b/src/interp/nrunfast.boot
@@ -39,6 +39,12 @@ namespace BOOT
$doNotCompressHashTableIfTrue := false
++
+$NRTvec := true
+
+++
+$monitorNewWorld := false
+
+++
$lookupDefaults := false
++
diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot
index e64c42d7..cc82e8b5 100644
--- a/src/interp/sys-driver.boot
+++ b/src/interp/sys-driver.boot
@@ -141,7 +141,7 @@ initMemoryConfig() ==
--%
-RESTART0() ==
+openDatabases() ==
COMPRESSOPEN()
INTERPOPEN()
OPERATIONOPEN()
@@ -167,28 +167,78 @@ restart() ==
if $displayStartMsgs then
spadStartUpMsgs()
$currentLine := nil
- RESTART0()
+ openDatabases()
readSpadProfileIfThere()
spad()
--%
+++ Initialize all global states that need to. Sub-routine of the command
+++ line compiler, the script executor, etc. Mess with care.
initializeGlobalState() ==
REROOT()
+ have_to := $StandardLinking or not %basicSystemIsComplete()
+
+ -- 0. Global variables.
+ $inLispVM := false
$IOindex := 1
- $InteractiveFrame := makeInitialModemapFrame()
- loadExposureGroupData()
- initHist()
- initializeInterpreterFrameRing()
$currentLine := nil
- RESTART0()
$NEWSPAD := true
$SPAD := true
$buildingSystemAlgebra :=
getOptionValue(Option '"system-algebra",%systemOptions())
+ GCMSG(NIL)
+ if have_to then
+ $superHash := MAKE_-HASHTABLE('UEQUAL)
+
+ -- 1. Macros.
+ if have_to then buildHtMacroTable()
+
+ -- 2. History
+ if $displayStartMsgs then
+ sayKeyedMsg("S2IZ0053",['"history"])
+ initHist()
+
+ -- 3. Databases
+ if $displayStartMsgs then
+ sayKeyedMsg("S2IZ0053",['"database"])
+ if have_to then -- ??? remove this functiom from the system?
+ SETF(SYMBOL_-FUNCTION "addConsDB", function IDENTITY)
+ if have_to then
+ fillDatabasesInCore()
+ mkLowerCaseConTable()
+ else
+ openDatabases()
+
+ -- 4. Constructors
+ if $displayStartMsgs then
+ sayKeyedMsg("S2IZ0053",['"constructors"])
+ loadExposureGroupData()
+ if have_to then makeConstructorsAutoLoad()
+
+ -- 5. Rule sets.
+ if not $ruleSetsInitialized
+ then initializeRuleSets()
+
+ -- 6. Interpreter
+ if have_to then
+ if $displayStartMsgs then
+ sayKeyedMsg("S2IZ0053",['"interpreter"])
+ initializeTimedNames($interpreterTimedNames,$interpreterTimedClasses)
+ statisticsInitialization()
+ initializeSystemCommands()
+ $InteractiveFrame := makeInitialModemapFrame()
+ initializeInterpreterFrameRing()
+
+ -- 7. Etc.
+ if have_to and functionp 'addtopath then
+ addtopath CONCAT(systemRootDirectory(),'"bin")
+ -- Take off
+
++ execute Spad script
executeSpadScript(progname,options,file) ==
+ $displayStartMsgs := false
initializeGlobalState()
if getOption(Option '"verbose",%systemOptions()) then
$verbose := true
@@ -208,6 +258,7 @@ associateRequestWithFileType(Option '"script", '"input",
++ compiler Spad Library File.
compileSpadLibrary(progname,options,file) ==
+ $displayStartMsgs := false
initializeGlobalState()
$EchoLines := false
ECHO_-META : fluid := false
@@ -224,6 +275,7 @@ associateRequestWithFileType(Option '"compile", '"spad",
buildDatabasesHandler(prog,options,args) ==
+ $displayStartMsgs := false
initializeGlobalState()
MAKE_-DATABASES args
coreQuit(errorCount() > 0 => 1; 0)
@@ -241,5 +293,7 @@ systemMain() ==
-- ??? do any substantial work if we call from it.
AxiomCore::topLevel()
REROOT()
+ -- ??? Make this call unconditional
+ if $StandardLinking then initializeGlobalState()
%basicSystemIsComplete() => restart()
fatalError '"fell off systemMain"
diff --git a/src/interp/util.lisp b/src/interp/util.lisp
index d18e2d37..6c664800 100644
--- a/src/interp/util.lisp
+++ b/src/interp/util.lisp
@@ -499,6 +499,7 @@
(reroot)
(|resetWorkspaceVariables|)
(|AxiomCore|::|%sysInit|)
+ (|buildHtMacroTable|)
(|initHist|)
(|initNewWorld|)
(compressopen)
@@ -509,8 +510,8 @@
(|setBootAutloadProperties| translate-functions translate-files)
(|setBootAutloadProperties| asauto-functions asauto-files)
(setf (symbol-function '|addConsDB|) #'identity)
- (resethashtables) ; the databases into core, then close the streams
- (|closeAllDatabases|)
+ (|fillDatabasesInCore|) ; the databases into core, then close the streams
+ (|closeAllDatabaseStreams|)
)