diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/ChangeLog | 14 | ||||
-rw-r--r-- | src/interp/g-timer.boot | 2 | ||||
-rw-r--r-- | src/interp/i-syscmd.boot | 15 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 2 | ||||
-rw-r--r-- | src/interp/patches.lisp | 18 | ||||
-rw-r--r-- | src/interp/setq.lisp | 1 | ||||
-rw-r--r-- | src/interp/sys-constants.boot | 5 | ||||
-rw-r--r-- | src/interp/sys-globals.boot | 4 |
8 files changed, 41 insertions, 20 deletions
diff --git a/src/interp/ChangeLog b/src/interp/ChangeLog index 7c9b7e1d..391d9dfd 100644 --- a/src/interp/ChangeLog +++ b/src/interp/ChangeLog @@ -1,3 +1,17 @@ +2007-12-06 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * lisplib.boot (getSlotFromDomain): Use pointer to function Undef + directly, instead of variable Undef. + * i-syscmd.boot (cd): Move from patches.lisp to here. + * g-timer.boot (printTimeIfTrue): Move from patches.lisp to here. + * patches.lisp (Undef): Remove. + ($printTimeIfTrue): Move to g-timer.boot. + (cd): Move to i-syscmd.boot. + (nullstream): Remove. + (nononullstream): Likewise. + (/MAJOR-VERSION): Move to sys-constants.boot. + * setq.lisp (/MAJOR-VERSION): Remove. + 2007-12-05 Gabriel Dos Reis <gdr@cs.tamu.edu> * Makefile.pamphlet (xruncomp.$(FASLEXT)): Remove rule. diff --git a/src/interp/g-timer.boot b/src/interp/g-timer.boot index 0f26f306..30fbfeac 100644 --- a/src/interp/g-timer.boot +++ b/src/interp/g-timer.boot @@ -40,6 +40,8 @@ import '"g-util" -- These functions can be used with arbitrary lists of -- named stats (listofnames) grouped in classes (listofclasses) -- and with measurement types (property, classproperty). + +printTimeIfTrue := false printNamedStatsByProperty(listofnames, property) == total := +/[GETL(name,property) for [name,:.] in listofnames] diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index d829e2aa..df0e8312 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -239,6 +239,21 @@ listConstructorAbbreviations() == whatSpad2Cmd '(packages) sayKeyedMsg("S2IZ0057",NIL) +--% )cd + +cd args == + dir := TRUENAME STRING(car args or '"") +)if %hasFeature KEYWORD::SBCL + SB_-POSIX::CHDIR NAMESTRING dir +)elseif %hasFeature KEYWORD::GCL + SYSTEM::CHDIR NAMESTRING dir +)else + internalError '"don't know how to chdir in this Lisp" +)endif + SETF(_*DEFAULT_-PATHNAME_-DEFAULTS_*, ensureTrailingSlash NAMESTRING dir) + sayKeyedMsg("S2IZ0070", [NAMESTRING _*DEFAULT_-PATHNAME_-DEFAULTS_*]) + + --% )clear clear l == clearSpad2Cmd l diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index 69caf0d0..be1bd700 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -550,7 +550,7 @@ getSlotFromDomain(dom,op,oldSig) == isPackageForm dom => getSlotFromPackage(dom,op,oldSig) domain:= evalDomain dom n:= findConstructorSlotNumber(dom,domain,op,sig) => - (slot:= domain.n).0 = Undef => + (slot:= domain.n).0 = function Undef => throwKeyedMsg("S2IL0023A",[op,formatSignature sig,dom]) slot throwKeyedMsg("S2IL0024A",[op,formatSignature sig,dom]) diff --git a/src/interp/patches.lisp b/src/interp/patches.lisp index 6d599002..21f12ec1 100644 --- a/src/interp/patches.lisp +++ b/src/interp/patches.lisp @@ -49,7 +49,6 @@ (define-function '|construct| #'list) ;; NEEDED , SPAD-COMPILER generated Lisp code (define-function '|COMP,TRAN| #'comp-tran) ;called by |compWithMappingMode| -(defvar |Undef| (function |Undef|)) ;needed in NewbFVectorCopy (define-function '|spadHash| #'sxhash) (defun |mkAutoLoad| (fn cname) @@ -57,24 +56,10 @@ (|autoLoad| fn cname) (apply cname args)))) -(setq |$printTimeIfTrue| nil) - - (defmacro dribinit (streamvar) `(if (is-console ,streamvar) (setq ,streamvar *terminal-io*))) -(defun |cd| (args) - (let ((dir (truename (string (or (car args) ""))))) - #+ :SBCL (sb-posix::chdir (namestring dir)) - #+ :GCL (system::chdir (namestring dir)) - #- (or :SBCL :GCL) (error "don't know how to chdir in this Lisp") - ;; FIXME: some Lisps may not properly end the name with slash - ;; investigate. - (setf *default-pathname-defaults* (|ensureTrailingSlash| dir)) - (|sayKeyedMsg| 'S2IZ0070 - (list (namestring *default-pathname-defaults*))))) - ;; The function top-level is the very root of the normal invocation ;; history stack. Control will pass to the restart function which is ;; also in this file. @@ -96,8 +81,6 @@ (setq |$useInternalHistoryTable| T) (defvar |$internalHistoryTable| ()) -(setq |nullstream| '|nullstream|) -(setq |nonnullstream| '|nonnullstream|) (defun |cpCms| (prefix &optional (string (|getSystemCommandLine|))) (setq string (concat prefix string)) (if (equal string "") (obey "sh") @@ -371,7 +354,6 @@ ;; (|xdrRead| xfoo (make-array 10 :element-type 'long-float )) ;; (setq *print-array* NIL) -(setq /MAJOR-VERSION 2) (setq echo-meta nil) (defun /versioncheck (n) (unless (= n /MAJOR-VERSION) (throw 'versioncheck -1))) diff --git a/src/interp/setq.lisp b/src/interp/setq.lisp index 8bf5520c..c496c5ff 100644 --- a/src/interp/setq.lisp +++ b/src/interp/setq.lisp @@ -42,7 +42,6 @@ (import-module "macros") (in-package "BOOT") -(SETQ |/MAJOR-VERSION| 7) (SETQ /RELEASE 0) (defconstant |$cclSystem| diff --git a/src/interp/sys-constants.boot b/src/interp/sys-constants.boot index 59e32e48..46330e78 100644 --- a/src/interp/sys-constants.boot +++ b/src/interp/sys-constants.boot @@ -47,6 +47,11 @@ $timerTicksPerSecond == INTERNAL_-TIME_-UNITS_-PER_-SECOND +++ Internal magic coockie. +_/MAJOR_-VERSION == + 2 + + -- -- Text formatting -- diff --git a/src/interp/sys-globals.boot b/src/interp/sys-globals.boot index 5d5ed751..afa4f685 100644 --- a/src/interp/sys-globals.boot +++ b/src/interp/sys-globals.boot @@ -425,3 +425,7 @@ _/TRACENAMES := nil ++ $highlightAllowed := true + +++ +_*PRINT_-CIRCLE_* := true +_*PRINT_-ARRAY_* := false |