diff options
-rw-r--r-- | src/ChangeLog | 17 | ||||
-rw-r--r-- | src/interp/Makefile.in | 5 | ||||
-rw-r--r-- | src/interp/debug.lisp | 2 | ||||
-rw-r--r-- | src/interp/g-error.boot | 2 | ||||
-rw-r--r-- | src/interp/i-output.boot | 3 | ||||
-rw-r--r-- | src/interp/patches.lisp | 28 | ||||
-rw-r--r-- | src/interp/sys-driver.boot | 2 | ||||
-rw-r--r-- | src/interp/word.boot | 21 |
8 files changed, 30 insertions, 50 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8649fc30..664cd4dc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,22 @@ 2012-01-14 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/word.boot: Add import and scope statements. Include in + final executables. + (infix?): Remove as duplicate in match.boot. + (prefix?): Likewise. + (suffix?): Likewise. + * interp/g-error.boot (returnToTopLevel): Tidy. + * interp/debug.lisp (/D-2): Use spadThrow in lieu of UNWIND. + * interp/patches.lisp (CATCHALL): Remove. + (DBRINIT): Likewise. + (TOPLEVEL): Likewise. + (TOP-LEVEL): Likewise. + (UNWIND): Likewise. + (RESUME): Likewise. + (booFind): Likewise. + +2012-01-14 Gabriel Dos Reis <gdr@cs.tamu.edu> + * lisp/core.lisp.in (mkIntArray): New. Export. * interp/patches.lisp (/RF): Move to cparse.boot. (/RQ): Likewise. diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in index 5930d44f..6407f63b 100644 --- a/src/interp/Makefile.in +++ b/src/interp/Makefile.in @@ -104,7 +104,7 @@ OBJS= boot-pkg.$(FASLEXT) types.$(FASLEXT) \ preparse.$(FASLEXT) bootlex.$(FASLEXT) \ spad.$(FASLEXT) spaderror.$(FASLEXT) \ termrw.$(FASLEXT) \ - trace.$(FASLEXT) \ + trace.$(FASLEXT) word.$(FASLEXT) \ fortcall.$(FASLEXT) i-parser.$(FASLEXT) \ $(OCOBJS) $(BROBJS) $(INOBJS) @@ -144,7 +144,7 @@ YEARWEEK=(progn (defconstant timestamp "${TIMESTAMP}") \ UNUSED= ${DOC}/guess.boot.dvi \ ${DOC}/interp-fix.boot.dvi \ ${DOC}/nhyper.boot.dvi ${DOC}/pf2atree.boot.dvi \ - ${DOC}/redefs.boot.dvi ${DOC}/word.boot.dvi + ${DOC}/redefs.boot.dvi .SUFFIXES: @@ -377,6 +377,7 @@ msgdb.$(FASLEXT): g-util.$(FASLEXT) g-error.$(FASLEXT): diagnostics.$(FASLEXT) g-util.$(FASLEXT) c-util.$(FASLEXT): g-opt.$(FASLEXT) pathname.$(FASLEXT): nlib.$(FASLEXT) +word.$(FASLEXT): g-util.$(FASLEXT) g-util.$(FASLEXT): ggreater.$(FASLEXT) macros.$(FASLEXT) daase.$(FASLEXT) g-cndata.$(FASLEXT): sys-macros.$(FASLEXT) c-util.$(FASLEXT) msg.$(FASLEXT): sys-macros.$(FASLEXT) astr.$(FASLEXT) diff --git a/src/interp/debug.lisp b/src/interp/debug.lisp index 25902a68..36a5d0e1 100644 --- a/src/interp/debug.lisp +++ b/src/interp/debug.lisp @@ -174,7 +174,7 @@ (SETQ INFILE FILE) (RETURN RECNO)))) ) (if (NOT RECNO) - (if (SETQ INFILE (/MKINFILENAM '(NIL))) (GO LOOP) (UNWIND))) + (if (SETQ INFILE (/MKINFILENAM '(NIL))) (GO LOOP) (|spadThrow|))) (TERPRI) (TERPRI) (SETQ INFILE (|pathname| INFILE)) diff --git a/src/interp/g-error.boot b/src/interp/g-error.boot index 3d7c58bf..844e18ac 100644 --- a/src/interp/g-error.boot +++ b/src/interp/g-error.boot @@ -143,7 +143,7 @@ TOP() == returnToTopLevel() returnToTopLevel() == SETQ(CHR, "ENDOFLINECHR") SETQ(TOK, 'END__UNIT) - TOPLEVEL() + THROW('TOP__LEVEL,'restart) returnToReader() == not $ReadingFile => returnToTopLevel() diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot index ccd535b7..497e9ae1 100644 --- a/src/interp/i-output.boot +++ b/src/interp/i-output.boot @@ -1214,6 +1214,9 @@ widthSC u == 10000 --% The over-large matrix package +$demoFlag := false + + maprinSpecial(x,$MARGIN,$LINELENGTH) == maprin0 x -- above line changed JHD 13/2/93 since it used to call maPrin diff --git a/src/interp/patches.lisp b/src/interp/patches.lisp index a4299431..20b0c6e8 100644 --- a/src/interp/patches.lisp +++ b/src/interp/patches.lisp @@ -37,33 +37,7 @@ (in-package "BOOT") ;;patches for now -(defun CATCHALL (a &rest b) a) ;; not correct but ok for now -(defvar |$demoFlag| nil) - -(defmacro dribinit (streamvar) - `(if (is-console ,streamvar) - (setq ,streamvar *terminal-io*))) - -;; 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. -;; For some unknown reason toplevel was redefined to incorrectly -;; call lisp::unwind whereas it is defined (in this file) to be -;; interned in the boot package. We've returned toplevel to its -;; previous definition. -(defun toplevel (&rest foo) (throw '|top_level| '|restart|)) -;;(defun toplevel (&rest foo) (lisp::unwind)) - -(define-function 'top-level #'toplevel) -(define-function 'unwind #'|spadThrow|) -(define-function 'resume #'|spadThrow|) - (setq *print-escape* nil) ;; so stringimage doesn't escape idents? -#+(and :GCL :IEEE-FLOATING-POINT ) - (setq system:*print-nans* T) - -;; following in defined in word.boot -(defun |bootFind| (word) ()) (defvar *msghash* nil "hash table keyed by msg number") @@ -94,5 +68,3 @@ (setq *msghash* (make-hash-table)) (cacheKeyedMsg |$defaultMsgDatabaseName|)) (gethash key *msghash*)) - -(|initializeTimedNames| |$interpreterTimedNames| |$interpreterTimedClasses|) diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot index 6dbbe12d..95a6b566 100644 --- a/src/interp/sys-driver.boot +++ b/src/interp/sys-driver.boot @@ -57,6 +57,7 @@ $options := [] +++ to the interpreter or compiler. +++ ??? This part is still in flux. symbolFunction('%sysInit) := () +-> + SETQ(_*PRINT_-ESCAPE_*,false) SETQ(_*READ_-DEFAULT_-FLOAT_-FORMAT_*, "DOUBLE-FLOAT") SETQ(_*PACKAGE_*, FIND_-PACKAGE '"BOOT") SETQ(_*LOAD_-VERBOSE_*,false) @@ -72,6 +73,7 @@ symbolFunction('%sysInit) := () +-> SETQ(COMPILER::_*COMPILE_-VERBOSE_*,false) SETQ(COMPILER::_*SUPPRESS_-COMPILER_-WARNINGS_*,true) SETQ(COMPILER::_*SUPPRESS_-COMPILER_-NOTES_*,true) + SETQ(SYSTEM::_*PRINT_-NANS_*,true) )endif --% diff --git a/src/interp/word.boot b/src/interp/word.boot index 195ce156..27fe7b2c 100644 --- a/src/interp/word.boot +++ b/src/interp/word.boot @@ -31,6 +31,8 @@ -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +import g_-util +namespace BOOT --======================================================================= -- Build Directories @@ -214,7 +216,7 @@ findApproximateWords(word,table) == alist:= tableValue(table,UPCASE word.0) --first try to break up as list of words - firstTry := [x for [x,:wordList] in alist | p] where p == + firstTry := [x for [x,:wordList] in alist | p] where p() == n = #wordList => sum := 0 for entry in wordList for part in words while sum < threshold repeat @@ -384,20 +386,3 @@ maskConvert str == else if c = char "?" then c := char "&" SUFFIX(c,buf) buf - - -infix?(s,t,x) == #s + #t >= #x and prefix?(s,x) and suffix?(t,x) - -prefix?(s,t) == substring?(s,t,0) - -suffix?(s,t) == - m := #s; n := #t - if m > n then return false - substring?(s,t,(n-m)) - -obSearch x == - vec:= OBARRAY() - pattern:= PNAME x - [y for i in 0..maxIndex OBARRAY() | - (ident? (y := vec.i) or CVEC y) and match?(pattern,copyTree y)] - |