diff options
author | dos-reis <gdr@axiomatics.org> | 2008-03-16 16:22:14 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-03-16 16:22:14 +0000 |
commit | cd820d07248dcce1106cbcd5e18bd4831b570f76 (patch) | |
tree | 04b8f733cf1bd764ce7123cb97b36407c2e5500f /src | |
parent | 48272db136adb7a6a2b36204d03f12760cc7aa40 (diff) | |
download | open-axiom-cd820d07248dcce1106cbcd5e18bd4831b570f76.tar.gz |
* lisp/Makefile.in (void_type): New.
(char_type): Likewise.
(int_type): Likewise.
(float_type): Likewise.
(double_type): Likewise.
(string_type): Likewise.
(pointer_type): Likewise.
(edit): Use them.
* interp/wi1.boot (ppFull): Tidy. Don't set *PRINT-DEPTH*.
* interp/vmlisp.lisp (gcmsg): Define when SBCL.
* interp/template.boot (measureCommon): Fix thinko.
* interp/sys-utility.boot: Move basic type definition from
g-util.boot to here.
* interp/g-util.boot (augProplistOf): Fix signature declaration.
* interp/daase.lisp: Tidy.
* interp/c-util.boot (displayComp): Remove assignment to
$X,$M,$F.
* interp/boot-pkg.lisp: Tidy.
* interp/axext_l.lisp: Likewise.
* interp/Makefile.pamphlet (makeint.lisp): Call GBC only when GCL.
($(axiom_targetdir)/algebra/exposed.$(FASLEXT)): Tidy.
(patches.$(FASLEXT)): Require debug.$(FASLEXT), g-timer.$(FASLEXT).
(wi2.$(FASLEXT)): Require define.$(FASLEXT).
(spad.$(FASLEXT)): Require postpar.$(FASLEXT), debug.$(FASLEXT).
* boot/translator.boot (genImportDeclaration): Include translation
for SBCL.
* boot/parser.boot (bpMapping): Tidy.
* boot/ast.boot (coreSymbol): New.
(bootSymbol): Likewise.
(bootSymbol): Likewise.
* lisp/core.lisp.in (|$NativeTypeTable|): New. Export.
* algebra/Makefile.pamphlet (COMPILE_LISP): Use $(INTERPSYS).
* algebra/exposed.lsp.pamphlet: Tidy.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 36 | ||||
-rw-r--r-- | src/algebra/Makefile.in | 2 | ||||
-rw-r--r-- | src/algebra/Makefile.pamphlet | 2 | ||||
-rw-r--r-- | src/algebra/exposed.lsp.pamphlet | 9 | ||||
-rw-r--r-- | src/boot/ast.boot | 14 | ||||
-rw-r--r-- | src/boot/parser.boot | 5 | ||||
-rw-r--r-- | src/boot/translator.boot | 8 | ||||
-rw-r--r-- | src/interp/Makefile.in | 14 | ||||
-rw-r--r-- | src/interp/Makefile.pamphlet | 18 | ||||
-rw-r--r-- | src/interp/axext_l.lisp | 42 | ||||
-rw-r--r-- | src/interp/boot-pkg.lisp | 5 | ||||
-rw-r--r-- | src/interp/c-util.boot | 1 | ||||
-rw-r--r-- | src/interp/daase.lisp | 3 | ||||
-rw-r--r-- | src/interp/g-util.boot | 12 | ||||
-rw-r--r-- | src/interp/patches.lisp | 2 | ||||
-rw-r--r-- | src/interp/sys-globals.boot | 4 | ||||
-rw-r--r-- | src/interp/sys-utility.boot | 10 | ||||
-rw-r--r-- | src/interp/template.boot | 2 | ||||
-rw-r--r-- | src/interp/vmlisp.lisp | 2 | ||||
-rw-r--r-- | src/interp/wi1.boot | 7 | ||||
-rw-r--r-- | src/interp/wi2.boot | 3 | ||||
-rw-r--r-- | src/lisp/Makefile.in | 17 | ||||
-rw-r--r-- | src/lisp/core.lisp.in | 11 |
23 files changed, 163 insertions, 66 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4fd3989d..32510f10 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,41 @@ 2008-03-16 Gabriel Dos Reis <gdr@cs.tamu.edu> + * lisp/Makefile.in (void_type): New. + (char_type): Likewise. + (int_type): Likewise. + (float_type): Likewise. + (double_type): Likewise. + (string_type): Likewise. + (pointer_type): Likewise. + (edit): Use them. + * interp/wi1.boot (ppFull): Tidy. Don't set *PRINT-DEPTH*. + * interp/vmlisp.lisp (gcmsg): Define when SBCL. + * interp/template.boot (measureCommon): Fix thinko. + * interp/sys-utility.boot: Move basic type definition from + g-util.boot to here. + * interp/g-util.boot (augProplistOf): Fix signature declaration. + * interp/daase.lisp: Tidy. + * interp/c-util.boot (displayComp): Remove assignment to + $X,$M,$F. + * interp/boot-pkg.lisp: Tidy. + * interp/axext_l.lisp: Likewise. + * interp/Makefile.pamphlet (makeint.lisp): Call GBC only when GCL. + ($(axiom_targetdir)/algebra/exposed.$(FASLEXT)): Tidy. + (patches.$(FASLEXT)): Require debug.$(FASLEXT), g-timer.$(FASLEXT). + (wi2.$(FASLEXT)): Require define.$(FASLEXT). + (spad.$(FASLEXT)): Require postpar.$(FASLEXT), debug.$(FASLEXT). + * boot/translator.boot (genImportDeclaration): Include translation + for SBCL. + * boot/parser.boot (bpMapping): Tidy. + * boot/ast.boot (coreSymbol): New. + (bootSymbol): Likewise. + (bootSymbol): Likewise. + * lisp/core.lisp.in (|$NativeTypeTable|): New. Export. + * algebra/Makefile.pamphlet (COMPILE_LISP): Use $(INTERPSYS). + * algebra/exposed.lsp.pamphlet: Tidy. + +2008-03-16 Gabriel Dos Reis <gdr@cs.tamu.edu> + * lib/Makefile.in ($(axiom_target_libdir)/libopen-axiom-core.$(DLLEXT)): Tidy. ($(axiom_target_libdir)/libspad.la): Likewise. diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index e0c99be5..dc5e3d24 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -10,7 +10,7 @@ EXTRACT_BOOTSTRAP_FILE = \ ## We use interpsys, built from previous stage, to bootstrap the algebra ## files. In fact, we use interpsys to build everything. -COMPILE_LISP = ../interp/interpsys$(EXEEXT) -- --compile --output=$@ $< +COMPILE_LISP = $(INTERPSYS) --compile --output=$@ $< INTERPSYS = ../interp/interpsys$(EXEEXT) -- --system="$(AXIOM)" \ diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index ff59f5a5..835df3b3 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -1328,7 +1328,7 @@ EXTRACT_BOOTSTRAP_FILE = \ <<environment>>= ## We use interpsys, built from previous stage, to bootstrap the algebra ## files. In fact, we use interpsys to build everything. -COMPILE_LISP = ../interp/interpsys$(EXEEXT) -- --compile --output=$@ $< +COMPILE_LISP = $(INTERPSYS) --compile --output=$@ $< @ diff --git a/src/algebra/exposed.lsp.pamphlet b/src/algebra/exposed.lsp.pamphlet index cc4000bc..3c12b66c 100644 --- a/src/algebra/exposed.lsp.pamphlet +++ b/src/algebra/exposed.lsp.pamphlet @@ -45,8 +45,9 @@ <<*>>= <<license>> -(in-package 'BOOT) -(setq |$globalExposureGroupAlist| +(import-module "boot-pkg") +(in-package "BOOT") +(defparameter |$globalExposureGroupAlist| '( ;;define the groups |basic| |naglink| |anna| |categories| |Hidden| |defaults| (|basic| @@ -1246,7 +1247,7 @@ (|VectorCategory&| . VECTCAT-) (|VectorSpace&| . VSPACE-))) ) -(setq |$localExposureDataDefault| (VECTOR +(defparameter |$localExposureDataDefault| (VECTOR (LIST ;;These groups will be exposed '|basic| @@ -1261,7 +1262,7 @@ ;;These constructors will be explicitly hidden ) )) -(setq |$localExposureData| (copy-seq |$localExposureDataDefault|)) +(defparameter |$localExposureData| (copy-seq |$localExposureDataDefault|)) @ \eject \begin{thebibliography}{99} diff --git a/src/boot/ast.boot b/src/boot/ast.boot index 210d5b2e..112236b6 100644 --- a/src/boot/ast.boot +++ b/src/boot/ast.boot @@ -1157,3 +1157,17 @@ bfThrow e == atom e => ["THROW",["QUOTE",e],nil] not atom first e => bpTrap() ["THROW",["QUOTE",first e],:rest e] + +--% Native datatype translation +coreSymbol: %Symbol -> %Symbol +coreSymbol s == + INTERN(SYMBOL_-NAME s, "AxiomCore") + +bootSymbol: %Symbol -> %Symbol +bootSymbol s == + INTERN SYMBOL_-NAME s + +nativeType t == + null t => t + t' := ASSOC(coreSymbol t,$NativeTypeTable) => bootSymbol rest t' + fatalError CONCAT('"unsupported native type: ", SYMBOL_-NAME t) diff --git a/src/boot/parser.boot b/src/boot/parser.boot index 5cc2d856..10970e82 100644 --- a/src/boot/parser.boot +++ b/src/boot/parser.boot @@ -458,8 +458,9 @@ bpSignature() == ++ Mapping: ++ (Name | IdList) -> Name bpMapping() == - (bpName() or bpIdList()) and bpEqKey "ARROW" and bpName() - and bpPush Mapping(bpPop1(), bpPop1()) + (bpName() or bpParenthesized function bpIdList) and + bpEqKey "ARROW" and bpName() and + bpPush Mapping(bpPop1(), bfUntuple bpPop1()) bpCancel()== a:=bpState() diff --git a/src/boot/translator.boot b/src/boot/translator.boot index 801848b8..5388c6c5 100644 --- a/src/boot/translator.boot +++ b/src/boot/translator.boot @@ -321,9 +321,15 @@ shoeAddComment l== CONCAT('"; ",CAR l) genImportDeclaration(op, sig) == sig isnt ["Signature", op', m] => coreError '"invalid signature" m isnt ["Mapping", t, s] => coreError '"invalid function type" + if not null s and SYMBOLP s then s := [s] %hasFeature KEYWORD::GCL => - if SYMBOLP s then s := [s] ["DEFENTRY", op, s, [t, SYMBOL_-NAME op']] + %hasFeature KEYWORD::SBCL => + args := [GENSYM() for x in s] + ["DEFUN",op,args, + [INTERN('"ALIEN-FUNCALL",'"SB-ALIEN"), + [INTERN('"EXTERN-ALIEN",'"SB-ALIEN"),SYMBOL_-NAME op', + ["FUNCTION",nativeType t,:[nativeType x for x in s]]], :args]] fatalError '"import declaration not implemented for this Lisp" shoeOutParse stream == diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in index 7eea5527..26fd1f92 100644 --- a/src/interp/Makefile.in +++ b/src/interp/Makefile.in @@ -209,7 +209,7 @@ makeint.lisp: ${OBJS} util.$(FASLEXT) \ @ echo '(|importModule| "sys-driver")' >> makeint.lisp @ echo '(|importModule| "vmlisp")' >> makeint.lisp @ echo '(|importModule| "hash")' >> makeint.lisp - @ echo '(gbc t)' >> makeint.lisp + @ echo '#+:GCL (gbc t)' >> makeint.lisp @ echo '(|importModule| "util")' >> makeint.lisp @ echo '(in-package "BOOT")' >> makeint.lisp @ touch ${TIMESTAMP} @@ -222,7 +222,7 @@ makeint.lisp: ${OBJS} util.$(FASLEXT) \ @ echo '(load "obey")' >> makeint.lisp @ echo '#+:akcl (setq compiler::*suppress-compiler-notes* t)' >> makeint.lisp @ echo '#+:akcl (si::gbc-time 0)' >> makeint.lisp - @ echo '(gbc t)' >> makeint.lisp + @ echo '#+:GCL (gbc t)' >> makeint.lisp ${SAVESYS}: makeint.lisp $(LOADSYS) -- --system="$(AXIOM)/" \ @@ -249,7 +249,7 @@ exposed.lsp: $(axiom_src_algdir)/exposed.lsp.pamphlet $(axiom_targetdir)/algebra/exposed.$(FASLEXT) : exposed.lsp ${LISPSYS} @ echo 616 making $@ from exposed.lsp $(mkinstalldirs) $(axiom_targetdir)/algebra - @ echo '(progn (compile-file "exposed.lsp" :output-file "$(axiom_targetdir)/algebra/exposed.$(FASLEXT)"))' | ${LISPSYS} + $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< database.date: @ echo 617 the database was updated...remaking interpsys @@ -326,7 +326,8 @@ hypertex.$(FASLEXT): hypertex.boot boot-pkg.$(FASLEXT) ## OpenAxiom's interpreter. -patches.$(FASLEXT): patches.lisp macros.$(FASLEXT) +patches.$(FASLEXT): patches.lisp macros.$(FASLEXT) sockio.$(FASLEXT) \ + g-timer.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< setvars.$(FASLEXT): setvars.boot macros.$(FASLEXT) debug.$(FASLEXT) @@ -406,7 +407,7 @@ setvart.$(FASLEXT): setvart.boot macros.$(FASLEXT) $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< ## OpenAxiom's compiler -wi2.$(FASLEXT): wi2.boot macros.$(FASLEXT) +wi2.$(FASLEXT): wi2.boot macros.$(FASLEXT) define.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< wi1.$(FASLEXT): wi1.boot macros.$(FASLEXT) @@ -624,7 +625,8 @@ spaderror.$(FASLEXT): spaderror.lisp macros.$(FASLEXT) debug.$(FASLEXT): debug.lisp macros.$(FASLEXT) parsing.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< -spad.$(FASLEXT): spad.lisp bootlex.$(FASLEXT) +spad.$(FASLEXT): spad.lisp bootlex.$(FASLEXT) postpar.$(FASLEXT) \ + debug.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< monitor.$(FASLEXT): monitor.lisp macros.$(FASLEXT) diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index ef951a9e..93b32464 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -361,8 +361,8 @@ be in the lisp image thus minimizing their startup time. @ <<warm.data>>= -(in-package 'boot) -(setq |$topicHash| (make-hash-table)) +(in-package "BOOT") +(defparameter |$topicHash| (make-hash-table)) (setf (gethash '|basic| |$topicHash|) 2) (setf (gethash '|algebraic| |$topicHash|) 4) (setf (gethash '|miscellaneous| |$topicHash|) 13) @@ -426,7 +426,7 @@ makeint.lisp: ${OBJS} util.$(FASLEXT) \ @ echo '(|importModule| "sys-driver")' >> makeint.lisp @ echo '(|importModule| "vmlisp")' >> makeint.lisp @ echo '(|importModule| "hash")' >> makeint.lisp - @ echo '(gbc t)' >> makeint.lisp + @ echo '#+:GCL (gbc t)' >> makeint.lisp @ echo '(|importModule| "util")' >> makeint.lisp @ echo '(in-package "BOOT")' >> makeint.lisp @ touch ${TIMESTAMP} @@ -439,7 +439,7 @@ makeint.lisp: ${OBJS} util.$(FASLEXT) \ @ echo '(load "obey")' >> makeint.lisp @ echo '#+:akcl (setq compiler::*suppress-compiler-notes* t)' >> makeint.lisp @ echo '#+:akcl (si::gbc-time 0)' >> makeint.lisp - @ echo '(gbc t)' >> makeint.lisp + @ echo '#+:GCL (gbc t)' >> makeint.lisp ${SAVESYS}: makeint.lisp $(LOADSYS) -- --system="$(AXIOM)/" \ @@ -514,7 +514,7 @@ exposed.lsp: $(axiom_src_algdir)/exposed.lsp.pamphlet $(axiom_targetdir)/algebra/exposed.$(FASLEXT) : exposed.lsp ${LISPSYS} @ echo 616 making $@ from exposed.lsp $(mkinstalldirs) $(axiom_targetdir)/algebra - @ echo '(progn (compile-file "exposed.lsp" :output-file "$(axiom_targetdir)/algebra/exposed.$(FASLEXT)"))' | ${LISPSYS} + $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< database.date: @ echo 617 the database was updated...remaking interpsys @@ -640,7 +640,8 @@ hypertex.$(FASLEXT): hypertex.boot boot-pkg.$(FASLEXT) ## OpenAxiom's interpreter. -patches.$(FASLEXT): patches.lisp macros.$(FASLEXT) +patches.$(FASLEXT): patches.lisp macros.$(FASLEXT) sockio.$(FASLEXT) \ + g-timer.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< setvars.$(FASLEXT): setvars.boot macros.$(FASLEXT) debug.$(FASLEXT) @@ -720,7 +721,7 @@ setvart.$(FASLEXT): setvart.boot macros.$(FASLEXT) $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< ## OpenAxiom's compiler -wi2.$(FASLEXT): wi2.boot macros.$(FASLEXT) +wi2.$(FASLEXT): wi2.boot macros.$(FASLEXT) define.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< wi1.$(FASLEXT): wi1.boot macros.$(FASLEXT) @@ -938,7 +939,8 @@ spaderror.$(FASLEXT): spaderror.lisp macros.$(FASLEXT) debug.$(FASLEXT): debug.lisp macros.$(FASLEXT) parsing.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< -spad.$(FASLEXT): spad.lisp bootlex.$(FASLEXT) +spad.$(FASLEXT): spad.lisp bootlex.$(FASLEXT) postpar.$(FASLEXT) \ + debug.$(FASLEXT) $(BOOTSYS) -- --compile --output=$@ --load-directory=. $< monitor.$(FASLEXT): monitor.lisp macros.$(FASLEXT) diff --git a/src/interp/axext_l.lisp b/src/interp/axext_l.lisp index a37d2c6e..ad3d5088 100644 --- a/src/interp/axext_l.lisp +++ b/src/interp/axext_l.lisp @@ -1,6 +1,6 @@ -;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. +;; 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 @@ -15,7 +15,7 @@ ;; the documentation and/or other materials provided with the ;; distribution. ;; -;; - Neither the name of The Numerical ALgorithms Group Ltd. nor the +;; - Neither the name of The Numerical Algorithms Group Ltd. nor the ;; names of its contributors may be used to endorse or promote products ;; derived from this software without specific prior written permission. ;; @@ -38,26 +38,13 @@ (import-module "foam_l") (in-package "FOAM-USER") -;; tacky but means we can run programs - -(defun H-integer (l e) - (|AXL-LiteralToInteger| l)) - -(defun H-string (l e) - (|AXL-LiteralToString| l)) - -(defun H-error (l e) - (|AXL-error| l)) - -(eval-when (load eval) - (defconstant |G-axclique_string_305639517| (cons #'H-String nil)) - (defconstant |G-axclique_integer_685864888| (cons #'H-integer nil)) - (defconstant |G-axclique_error_011667951| (cons #'H-error nil))) - ;; Literals should be null-terminated strings ;; SingleInteger +(eval-when (:compile-toplevel :load-toplevel :execute) + (progn + (defmacro |AXL-LiteralToSingleInteger| (l) `(parse-integer ,l :junk-allowed t)) @@ -196,6 +183,23 @@ ;; Vectors +;; tacky but means we can run programs + +(defun H-integer (l e) + (|AXL-LiteralToInteger| l)) + +(defun H-string (l e) + (|AXL-LiteralToString| l)) + +(defun H-error (l e) + (|AXL-error| l)) + +)) + +(eval-when (load eval) + (defconstant |G-axclique_string_305639517| (cons #'H-String nil)) + (defconstant |G-axclique_integer_685864888| (cons #'H-integer nil)) + (defconstant |G-axclique_error_011667951| (cons #'H-error nil))) ;; Testing diff --git a/src/interp/boot-pkg.lisp b/src/interp/boot-pkg.lisp index 3d4dc57c..12d8915c 100644 --- a/src/interp/boot-pkg.lisp +++ b/src/interp/boot-pkg.lisp @@ -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 @@ -30,13 +30,12 @@ ;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -;; -;; Copyright (C) 2007 Gabriel Dos Reis (defpackage "BOOT" #+:common-lisp (:use "COMMON-LISP") #-:common-lisp (:use "LISP") + #+:SBCL (:use "SB-ALIEN") (:use "AxiomCore")) (in-package "BOOT") diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index d0e4f037..850fe090 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -108,7 +108,6 @@ displayComp level == pp removeZeroOne mkErrorExpr level sayBrightly ['"****** level",'%b,level,'%d,'" ******"] [$x,$m,$f,$exitModeStack]:= ELEM($s,level) - ($X:=$x;$M:=$m;$F:=$f) SAY("$x:= ",$x) SAY("$m:= ",$m) SAY "$f:=" diff --git a/src/interp/daase.lisp b/src/interp/daase.lisp index 00525246..57732417 100644 --- a/src/interp/daase.lisp +++ b/src/interp/daase.lisp @@ -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 @@ -201,6 +201,7 @@ ; -- tim daly (import-module "macros") +(in-package "AxiomCore") (import-module "foam_l") (in-package "BOOT") diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 272ad517..539bf56b 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -39,16 +39,6 @@ import '"sys-utility" ++ $interpOnly := false -++ Basic types used throughout Boot codes. -%Boolean <=> BOOLEAN -%Short <=> FIXNUM -%Integer <=> BIGNUM -%Symbol <=> SYMBOL -%String <=> STRING -%List <=> LIST -%Vector <=> VECTOR -%Thing <=> true - --% Utility Functions of General Use ELEMN(x, n, d) == @@ -97,7 +87,7 @@ get2(x,prop,e) == ++ Update properties of an entity in an environment. put: (%Thing,%Symbol,%Thing,%List) -> %List addBinding: (%Thing,%List,%List) -> %List -augProplistOf: (%Thing,%List,%Thing,%List) -> %List +augProplistOf: (%Thing,%Symbol,%Thing,%List) -> %List augProplist: (%List,%Thing,%Thing) -> %List put(x,prop,val,e) == diff --git a/src/interp/patches.lisp b/src/interp/patches.lisp index 5bce910d..915efc21 100644 --- a/src/interp/patches.lisp +++ b/src/interp/patches.lisp @@ -32,6 +32,8 @@ ;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. (import-module "macros") +(import-module "debug") +(import-module "g-timer") (in-package "BOOT") ;;patches for now diff --git a/src/interp/sys-globals.boot b/src/interp/sys-globals.boot index 4d326287..4c72a011 100644 --- a/src/interp/sys-globals.boot +++ b/src/interp/sys-globals.boot @@ -449,3 +449,7 @@ $sourceFiles := [] ++ ??? bogus initialization for now INPUTSTREAM := "T" +++ ??? +$x := nil +$f := nil +$m := nil diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot index 2e8502dd..ff8e32cb 100644 --- a/src/interp/sys-utility.boot +++ b/src/interp/sys-utility.boot @@ -36,6 +36,16 @@ import '"vmlisp" )package "BOOT" +++ Basic types used throughout Boot codes. +%Boolean <=> BOOLEAN +%Short <=> FIXNUM +%Integer <=> BIGNUM +%Symbol <=> SYMBOL +%String <=> STRING +%List <=> LIST +%Vector <=> VECTOR +%Thing <=> true + ++ returns true if `f' is bound to a macro. macrop: %Thing -> %Boolean macrop f == diff --git a/src/interp/template.boot b/src/interp/template.boot index cf3adf6b..ada43d26 100644 --- a/src/interp/template.boot +++ b/src/interp/template.boot @@ -318,7 +318,7 @@ measureCommon u == $table: local := MAKE_-HASHTABLE 'UEQUAL fn(u,0) where fn(u,n) == n + VECP u => +/[fn(u.i,0) for i in 0..MAXINDEX u] - HASH-TABLE-P u => + HASH_-TABLE_-P u => +/[fn(key,0) + fn(HGET(u,key),0) for key in HKEYS u] PAIRP u => HGET($table,u) => 0 diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp index 889b3c58..ddfc83ba 100644 --- a/src/interp/vmlisp.lisp +++ b/src/interp/vmlisp.lisp @@ -1829,7 +1829,7 @@ #+:cmulisp (defun gcmsg (x) (prog1 ext:*gc-verbose* (setq ext:*gc-verbose* x))) -#+:allegro +#+ (or :allegro :sbcl) (defun gcmsg (x)) #+Lucid diff --git a/src/interp/wi1.boot b/src/interp/wi1.boot index c97a61d5..cee264b1 100644 --- a/src/interp/wi1.boot +++ b/src/interp/wi1.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 @@ -62,9 +62,8 @@ stackMessage msg == nil ppFull x == - _*PRINT_-LEVEL_* : local := nil - _*PRINT_-DEPTH_* : local := nil - _*PRINT_-LENGTH_* : local := nil + SETQ(_*PRINT_-LEVEL_*,nil) + SETQ(_*PRINT_-LENGTH_*,nil) pp x put(x,prop,val,e) == diff --git a/src/interp/wi2.boot b/src/interp/wi2.boot index 45fa17f3..2fe55053 100644 --- a/src/interp/wi2.boot +++ b/src/interp/wi2.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 @@ -33,6 +33,7 @@ import '"macros" +import '"define" )package "BOOT" compDefineFunctor1(df, m,$e,$prefix,$formalArgList) == diff --git a/src/lisp/Makefile.in b/src/lisp/Makefile.in index 5bf625d4..c9a76d8d 100644 --- a/src/lisp/Makefile.in +++ b/src/lisp/Makefile.in @@ -117,12 +117,27 @@ base-lisp$(EXEEXT): core.$(FASLEXT) axiom_optimize_options = @axiom_optimize_options@ +void_type = @void_type@ +char_type = @char_type@ +int_type = @int_type@ +float_type = @float_type@ +double_type = @double_type@ +string_type = @string_type@ +pointer_type = @pointer_type@ + edit = sed \ -e 's|@open_axiom_installdir[@]|$(open_axiom_installdir)|g' \ -e 's|@axiom_optimize_options[@]|$(axiom_optimize_options)|g' \ -e 's|@host[@]|$(host)|g' \ -e 's|@build[@]|$(build)|g' \ - -e 's|@target[@]|$(target)|g' + -e 's|@target[@]|$(target)|g' \ + -e 's|@void_type[@]|$(void_type)|g' \ + -e 's|@char_type[@]|$(char_type)|g' \ + -e 's|@int_type[@]|$(int_type)|g' \ + -e 's|@float_type[@]|$(float_type)|g' \ + -e 's|@double_type[@]|$(double_type)|g' \ + -e 's|@string_type[@]|$(string_type)|g' \ + -e 's|@pointer_type[@]|$(pointer_type)|g' core.lisp: $(srcdir)/core.lisp.in $(edit) $< > $@.tmp diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index 23b119ac..433dc720 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -72,6 +72,7 @@ "$faslType" "$systemInstallationDirectory" + "$NativeTypeTable" "getCommandLineArguments" "processCommandLine" @@ -774,3 +775,13 @@ #+ :sbcl (eval-when (:load-toplevel :execute) (pushnew #'shoe-provide-module sb-ext:*module-provider-functions*)) + +;; native data type translation table +(defconstant |$NativeTypeTable| + '((|void| . @void_type@) + (|char| . @char_type@) + (|int| . @int_type@) + (|float| . @float_type@) + (|double| . @double_type@) + (|string| . @string_type@) + (|pointer| . @pointer_type@))) |