From 259d1b019dabdf6a0c2b40cabaf013afcbc582ac Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 5 Nov 2007 01:51:35 +0000 Subject: * Makefile.pamphlet (iterator.$(FASLEXT)): New rule. (modemap.$(FASLEXT)): Likewise. (info.$(FASLEXT)): Likewise. (msgdb.$(FASLEXT)): Likewise. (<>): Remove. (<>): Likewise. (<>): Likewise. (<>): Likewise. * c-util.boot (intersectionContour): Change setIntersection to intersection. Change SetUnion to union. * database.boot (insertModemap): Move to modemap.boot.pamphlet. * i-util.boot.pamphlet (addModemap): Likewise. * info.boot.pamphlet: Push into package "BOOT". Fix syntax. * iterator.boot.pamphlet: Push into package "BOOT". * modemap.boot.pamphlet: Likewise. * msgdb.boot.pamphlet: Push into package "BOOT". Fix syntax. * sys-globals.boot (*BUILD-VERSION*): Define. (*YEARWEEK*): Likewise. --- src/interp/ChangeLog | 21 +++ src/interp/Makefile.in | 46 ++---- src/interp/Makefile.pamphlet | 311 ++------------------------------------ src/interp/c-util.boot | 4 +- src/interp/database.boot | 8 - src/interp/i-util.boot.pamphlet | 9 -- src/interp/info.boot.pamphlet | 11 +- src/interp/iterator.boot.pamphlet | 3 + src/interp/modemap.boot.pamphlet | 24 ++- src/interp/msgdb.boot.pamphlet | 21 +-- src/interp/sys-globals.boot | 3 + 11 files changed, 94 insertions(+), 367 deletions(-) diff --git a/src/interp/ChangeLog b/src/interp/ChangeLog index a3bf75ef..0b069080 100644 --- a/src/interp/ChangeLog +++ b/src/interp/ChangeLog @@ -1,3 +1,24 @@ +2007-11-04 Gabriel Dos Reis + + * Makefile.pamphlet (iterator.$(FASLEXT)): New rule. + (modemap.$(FASLEXT)): Likewise. + (info.$(FASLEXT)): Likewise. + (msgdb.$(FASLEXT)): Likewise. + (<>): Remove. + (<>): Likewise. + (<>): Likewise. + (<>): Likewise. + * c-util.boot (intersectionContour): Change setIntersection to + intersection. Change SetUnion to union. + * database.boot (insertModemap): Move to modemap.boot.pamphlet. + * i-util.boot.pamphlet (addModemap): Likewise. + * info.boot.pamphlet: Push into package "BOOT". Fix syntax. + * iterator.boot.pamphlet: Push into package "BOOT". + * modemap.boot.pamphlet: Likewise. + * msgdb.boot.pamphlet: Push into package "BOOT". Fix syntax. + * sys-globals.boot (*BUILD-VERSION*): Define. + (*YEARWEEK*): Likewise. + 2007-11-04 Gabriel Dos Reis * Makefile.pamphlet (record.$(FASLEXT)): New rule. diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in index f928bbe0..5c6e25e7 100644 --- a/src/interp/Makefile.in +++ b/src/interp/Makefile.in @@ -269,24 +269,6 @@ ${SAVESYS}: makeint.lisp --load-directory=. makeint.lisp @ echo 6 ${SAVESYS} created $(mkinstalldirs) $(axiom_target_bindir) -depsys_lisp_sources += parsing.lisp metalex.lisp bootlex.lisp \ - newaux.lisp preparse.lisp postprop.lisp \ - fnewmeta.lisp - -depsys_boot_sources = postpar.boot parse.boot clam.boot slam.boot \ - g-boot.boot g-error.boot c-util.boot g-util.boot - -depsys_SOURCES = $(depsys_lisp_SOURCES) $(depsys_boot_SOURCES) - -depsys_objects = nocompil.$(FASLEXT) bookvol5.$(FASLEXT) g-error.$(FASLEXT) \ - util.$(FASLEXT) postpar.$(FASLEXT) parse.$(FASLEXT) \ - parsing.$(FASLEXT) metalex.$(FASLEXT) bootlex.$(FASLEXT) \ - newaux.$(FASLEXT) preparse.$(FASLEXT) postprop.$(FASLEXT) \ - fnewmeta.$(FASLEXT) clam.$(FASLEXT) \ - slam.$(FASLEXT) g-boot.$(FASLEXT) c-util.$(FASLEXT) \ - g-util.$(FASLEXT) - - ${DEPSYS}: vmlisp.$(FASLEXT) \ hash.$(FASLEXT) \ bits.$(FASLEXT) \ @@ -456,6 +438,9 @@ record.$(FASLEXT): record.boot nlib.$(FASLEXT) pathname.$(FASLEXT) ## OpenAxiom's compiler +iterator.$(FASLEXT): iterator.boot g-util.$(FASLEXT) + $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< + define.$(FASLEXT): define.boot cattable.$(FASLEXT) category.$(FASLEXT) \ c-util.$(FASLEXT) $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< @@ -595,6 +580,12 @@ dq.$(FASLEXT): dq.boot boot-pkg.$(FASLEXT) ## General support and utilities. +modemap.$(FASLEXT): modemap.boot c-util.$(FASLEXT) info.$(FASLEXT) + $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< + +info.$(FASLEXT): info.boot g-util.$(FASLEXT) + $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< + slam.$(FASLEXT): slam.boot g-timer.$(FASLEXT) $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< @@ -607,6 +598,9 @@ g-opt.$(FASLEXT): g-opt.boot def.$(FASLEXT) g-timer.$(FASLEXT): g-timer.boot macros.$(FASLEXT) g-util.$(FASLEXT) $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< +msgdb.$(FASLEXT): msgdb.boot g-util.$(FASLEXT) + $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< + g-boot.$(FASLEXT): g-boot.boot def.$(FASLEXT) g-util.$(FASLEXT) $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< @@ -734,10 +728,6 @@ i-map.clisp: i-map.boot @ echo 304 making $@ from $< @ echo '(old-boot::boot "i-map.boot")' | ${DEPSYS} -info.clisp: info.boot - @ echo 329 making $@ from $< - @ echo '(old-boot::boot "info.boot")' | ${DEPSYS} - i-resolv.clisp: i-resolv.boot @ echo 310 making $@ from $< @ echo '(old-boot::boot "i-resolv.boot")' | ${DEPSYS} @@ -754,10 +744,6 @@ i-syscmd.clisp: i-syscmd.boot @ echo 319 making $@ from $< @ echo '(old-boot::boot "i-syscmd.boot")' | ${DEPSYS} -iterator.clisp: iterator.boot - @ echo 333 making $@ from $< - @ echo '(old-boot::boot "iterator.boot")' | ${DEPSYS} - i-toplev.clisp: i-toplev.boot @ echo 322 making $@ from $< @ echo '(old-boot::boot "i-toplev.boot")' | ${DEPSYS} @@ -766,14 +752,6 @@ i-util.clisp: i-util.boot @ echo 325 making $@ from $< @ echo '(old-boot::boot "i-util.boot")' | ${DEPSYS} -modemap.clisp: modemap.boot - @ echo 343 making $@ from $< - @ echo '(old-boot::boot "modemap.boot")' | ${DEPSYS} - -msgdb.clisp: msgdb.boot - @ echo 346 making $@ from $< - @ echo '(old-boot::boot "msgdb.boot")' | ${DEPSYS} - nruncomp.clisp: nruncomp.boot @ echo 353 making $@ from $< @ echo '(old-boot::boot "nruncomp.boot")' | ${DEPSYS} diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index fa092a7a..9cbe7046 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -576,51 +576,6 @@ and compiled to native object code, as usual. $(axiom_build_document) --tangle --output=$@ $< @ -\section{Proclaim optimization} - -\Tool{GCL}, and possibly other common lisps, can generate much better -code if the function argument types and return values are proclaimed. - -In theory what we should do is scan all of the functions in the system -and create a file of proclaim definitions. These proclaim definitions -should be loaded into the image before we do any compiles so they can -allow the compiler to optimize function calling. - -\Tool{GCL} has an approximation to this scanning which we use here. - -The first step is to build a version of GCL that includes [[gcl_collectfn]]. -This file contains code that enhances the lisp compiler and creates a -hash table of structs. Each struct in the hash table describes information -that about the types of the function being compiled and the types of its -arguments. At the end of the compile-file this hash table is written out -to a ".fn" file. - -The second step is to build axiom images (depsys, interpsys, AXIOMsys) -which contain the [[gcl_collectfn]] code. - -The third step is to build the system. This generates a .fn file for -each lisp file that gets compiled. - -The fourth step is to build the proclaims.lisp files. There is one -proclaims.lisp file for -boot (boot-proclaims.lisp), -interp (interp-proclaims.lisp), and -algebra (algebra-proclaims.lisp). - -To build the proclaims file (e.g. for interp) we: -\begin{verbatim} -(a) cd to obj/linux/interp -(b) (yourpath)/axiom/obj/linux/bin/lisp -(c) (load "sys-pkg.lsp") -(d) (mapcar #'load (directory "*.fn")) -(e) (with-open-file (out "interp-proclaims.lisp" :direction :output) - (compiler::make-proclaims out)) -\end{verbatim} -Note that step (c) is only used for interp, not for boot. - -The fifth step is to copy the newly constructed proclaims file back -into the src/interp diretory (or boot, algebra). - \section{The warm.data file} This is a file of commands that will be loaded into interpsys @@ -697,222 +652,8 @@ This code used to read: @ \end{verbatim} -Now game is much more difficult. -\begin{verbatim} - - '(progn \ - -\end{verbatim} - -[[si::*collect-binary-modules*]] instructs GCL to build a list of -binary object modules loaded into the current session with (load ...) -The list will be stored in [[si::*binary-modules*]]. -\begin{verbatim} - - (setq si::*collect-binary-modules* t) \ - (load "makedep.lisp") \ - -\end{verbatim} - -[[compiler::link]] is a lisp interface to the ``ld'' C-based system linker. -The first argumet is a list of [[.o]] binary object modules to link into a -fresh gcl image. The second argument is the name of the new output -image. The third argument is a string containing an initialization -command to run in the new image to reinitialize the heap. The fourth -argument is a list of external C libraries, either static or dynamic, -that one wishes to link into the fresh image. The last argument is a -flag which indicates whether GCL should initialize all of the freshly -linked in new lisp modules, or whether it should transparently -redirect load calls in the new image to initialization calls for the -already linked in module. - -Some lisp systems, such as acl2, have a complex heap initialization, -in which load calls must be interspersed with other form evaluation -comprising the logic of the heap construction. Others, such as -maxima, have no such complex initialization sequence. -\begin{verbatim} - - (compiler::link \ - -\end{verbatim} -[[si::*binary-modules*]] here has the list of compiled lisp binary module -.o files loaded by makedep.lsp above. -\begin{verbatim} - - (remove-duplicates si::*binary-modules* :test (quote equal)) \ - -\end{verbatim} - -The name of the output image. -\begin{verbatim} - - "$(DEPSYS)" \ - -\end{verbatim} - -This will be run in the newly linked sub-image. -\begin{verbatim} - - (format nil "\ - -\end{verbatim} - -Collect loaded binary modules again to make sure that there are none, -as all should be already linked in via ld. For error checking -purposes. -\begin{verbatim} - -(setq si::*collect-binary-modules* t) \ - -\end{verbatim} - -We need to find [[gcl_collectfn.lsp]], so set the [[*load-path*]], and make -sure the source, not the binary, form is loaded here, as we're only -using this entire sequence on machines which cannot load binary object -modules and preserve them in saved images. -\begin{verbatim} - -(let ((si::*load-path* (cons ~S si::*load-path*))\ - (si::*load-types* ~S))\ - -\end{verbatim} - -Turn on function analyzation and autoload thereby [[gcl_collectfn.lsp]]. -\begin{verbatim} - -(compiler::emit-fn t))\ - -\end{verbatim} - -Load the heap creation sequence again in the fresh new image, this -time transparently redirecting all calls to load of binary modules -invoked thereby into initialization calls for the already linkned in -module. - -Load has code in it to recognize when a module is already linked in, -and to forgo in this case the actual load and replace with a mere -initialization call instead. -\begin{verbatim} - -(load \"makedep.lisp\")\ - -(gbc t)\ - -\end{verbatim} - -It is an error to load a binary module. Calling load will not -reload them but only run initialization. -Throw an error if we've actually loaded any binary modules. -\begin{verbatim} - -(when si::*binary-modules* \ -(error si::*binary-modules*))\ - -\end{verbatim} - -Unset the binary module collection flags. -\begin{verbatim} - -(setq si::collect-binary-modules* nil si::*binary-modules* nil)\ -(gbc t)\ - -\end{verbatim} - -Turn on SGC (Stratified Garbage Collection) in the final image. This -is a optional gbc algorithm which is suitable for images which will -not grow much further. It marks a large fraction of the heap -read-only, eliminating such pages from the time-consuming gbc -processing. When writes are actually made to such pages, a segfault -is triggered which is handled by a function which remarks the pages -read-write and continues. -\begin{verbatim} - -(when (fboundp (quote si::sgc-on)) (si::sgc-on t))\ - -\end{verbatim} - -This is a flag which instructs the GCL compiler to make unique -initialzation function C names. This is necessary when using ld, as -all function names must be unique. -\begin{verbatim} - -(setq compiler::*default-system-p* t)\ - -si::*system-directory* goes into the *load-path*, and .lsp in the *load-types*. - -" si::*system-directory* (quote (list ".lsp")))\ - -\end{verbatim} -No C libraries to link in here. -\begin{verbatim} - -"" \ - -\end{verbatim} - -Do not run the initialization code for the newly linked in lisp -modules ``by hand'', but rather rely on the transparent load redirection -described above to initialize at the proper moment in the heap -initialization sequence. -\begin{verbatim} - -nil))' | $(LISPSYS)) - -\end{verbatim} -The [[save depsys image]] was supposed to read: -\begin{verbatim} - @ (cd ${OBJ}/${SYS}/bin ; \ - echo '(progn \ - (setq si::*collect-binary-modules* t) \ - (load "makedep.lisp") \ - (compiler::link \ - (remove-duplicates si::*binary-modules* :test (quote equal)) \ - "$(DEPSYS)" \ - (format nil "\ - (setq si::*collect-binary-modules* t) \ - (let ((si::*load-path* (cons ~S si::*load-path*))\ - (si::*load-types* ~S))\ - (compiler::emit-fn t))\ - (load \"makedep.lisp\")\ - (gbc t)\ - (when si::*binary-modules* \ - (error si::*binary-modules*))\ - (setq si::collect-binary-modules* nil si::*binary-modules* nil)\ - (gbc t)\ - (when (fboundp (quote si::sgc-on)) (si::sgc-on t))\ - (setq compiler::*default-system-p* t)\ - " si::*system-directory* (quote (list ".lsp")))\ - "" \ - nil))' | $(LISPSYS)) -\end{verbatim} - -This scheme does not work. It fails during loading with multiple messages -of the form: -\begin{verbatim} -/home/axiom--main--1--patch-33/obj/linux/interp/parse.o(.text+0x5660): In function `init_code': -: multiple definition of `init_code' -/home/axiom--main--1--patch-33/obj/linux/interp/postpar.o(.text+0x4e78): first defined here -\end{verbatim} <>= -depsys_lisp_sources += parsing.lisp metalex.lisp bootlex.lisp \ - newaux.lisp preparse.lisp postprop.lisp \ - fnewmeta.lisp - -depsys_boot_sources = postpar.boot parse.boot clam.boot slam.boot \ - g-boot.boot g-error.boot c-util.boot g-util.boot - -depsys_SOURCES = $(depsys_lisp_SOURCES) $(depsys_boot_SOURCES) - -depsys_objects = nocompil.$(FASLEXT) bookvol5.$(FASLEXT) g-error.$(FASLEXT) \ - util.$(FASLEXT) postpar.$(FASLEXT) parse.$(FASLEXT) \ - parsing.$(FASLEXT) metalex.$(FASLEXT) bootlex.$(FASLEXT) \ - newaux.$(FASLEXT) preparse.$(FASLEXT) postprop.$(FASLEXT) \ - fnewmeta.$(FASLEXT) clam.$(FASLEXT) \ - slam.$(FASLEXT) g-boot.$(FASLEXT) c-util.$(FASLEXT) \ - g-util.$(FASLEXT) - - ${DEPSYS}: vmlisp.$(FASLEXT) \ hash.$(FASLEXT) \ bits.$(FASLEXT) \ @@ -1229,38 +970,6 @@ i-util.clisp: i-util.boot @ echo '(old-boot::boot "i-util.boot")' | ${DEPSYS} @ -\subsection{info.boot} - -<>= -info.clisp: info.boot - @ echo 329 making $@ from $< - @ echo '(old-boot::boot "info.boot")' | ${DEPSYS} -@ - -\subsection{iterator.boot} - -<>= -iterator.clisp: iterator.boot - @ echo 333 making $@ from $< - @ echo '(old-boot::boot "iterator.boot")' | ${DEPSYS} -@ - -\subsection{modemap.boot} - -<>= -modemap.clisp: modemap.boot - @ echo 343 making $@ from $< - @ echo '(old-boot::boot "modemap.boot")' | ${DEPSYS} -@ - -\subsection{msgdb.boot} - -<>= -msgdb.clisp: msgdb.boot - @ echo 346 making $@ from $< - @ echo '(old-boot::boot "msgdb.boot")' | ${DEPSYS} -@ - \subsection{nruncomp.boot} <>= @@ -1531,6 +1240,9 @@ record.$(FASLEXT): record.boot nlib.$(FASLEXT) pathname.$(FASLEXT) ## OpenAxiom's compiler +iterator.$(FASLEXT): iterator.boot g-util.$(FASLEXT) + $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< + define.$(FASLEXT): define.boot cattable.$(FASLEXT) category.$(FASLEXT) \ c-util.$(FASLEXT) $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< @@ -1670,6 +1382,12 @@ dq.$(FASLEXT): dq.boot boot-pkg.$(FASLEXT) ## General support and utilities. +modemap.$(FASLEXT): modemap.boot c-util.$(FASLEXT) info.$(FASLEXT) + $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< + +info.$(FASLEXT): info.boot g-util.$(FASLEXT) + $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< + slam.$(FASLEXT): slam.boot g-timer.$(FASLEXT) $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< @@ -1682,6 +1400,9 @@ g-opt.$(FASLEXT): g-opt.boot def.$(FASLEXT) g-timer.$(FASLEXT): g-timer.boot macros.$(FASLEXT) g-util.$(FASLEXT) $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< +msgdb.$(FASLEXT): msgdb.boot g-util.$(FASLEXT) + $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< + g-boot.$(FASLEXT): g-boot.boot def.$(FASLEXT) g-util.$(FASLEXT) $(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $< @@ -1771,8 +1492,6 @@ boot-pkg.$(FASLEXT): boot-pkg.lisp <> -<> - <> <> @@ -1781,16 +1500,10 @@ boot-pkg.$(FASLEXT): boot-pkg.lisp <> -<> - <> <> -<> - -<> - <> <> diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index e5f0a977..1fc1e117 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -164,8 +164,8 @@ intersectionContour(c,c') == computeIntersection(c,c') == varlist:= REMDUP ASSOCLEFT c varlist':= REMDUP ASSOCLEFT c' - interVars:= setIntersection(varlist,varlist') - unionVars:= setUnion(varlist,varlist') + interVars:= intersection(varlist,varlist') + unionVars:= union(varlist,varlist') diffVars:= setDifference(unionVars,interVars) modeAssoc:= buildModeAssoc(diffVars,c,c') [:modeAssoc,: diff --git a/src/interp/database.boot b/src/interp/database.boot index 20b1df7c..af87539e 100644 --- a/src/interp/database.boot +++ b/src/interp/database.boot @@ -581,14 +581,6 @@ getOplistWithUniqueSignatures(op,pairlis,signatureAlist) == alist) alist ---% Code For Modemap Insertion - -insertModemap(new,mmList) == - null mmList => [new] ---isMoreSpecific(new,old:= first mmList) => [new,:mmList] ---[old,:insertModemap(new,rest mmList)] - [new,:mmList] - --% Exposure Group Code dropPrefix(fn) == diff --git a/src/interp/i-util.boot.pamphlet b/src/interp/i-util.boot.pamphlet index c0d785da..899cc18f 100644 --- a/src/interp/i-util.boot.pamphlet +++ b/src/interp/i-util.boot.pamphlet @@ -189,15 +189,6 @@ HasSignature(domain,[op,sig]) == makeInitialModemapFrame() == COPY $InitialModemapFrame -addModemap(op,mc,sig,pred,fn,$e) == - $InteractiveMode => $e - if knownInfo pred then pred:=true - $insideCapsuleFunctionIfTrue=true => - $CapsuleModemapFrame := - addModemap0(op,mc,sig,pred,fn,$CapsuleModemapFrame) - $e - addModemap0(op,mc,sig,pred,fn,$e) - isCapitalWord x == (y := PNAME x) and and/[UPPER_-CASE_-P y.i for i in 0..MAXINDEX y] diff --git a/src/interp/info.boot.pamphlet b/src/interp/info.boot.pamphlet index ead9f3e1..ba2ef824 100644 --- a/src/interp/info.boot.pamphlet +++ b/src/interp/info.boot.pamphlet @@ -73,6 +73,9 @@ The use of two representations is admitted to be clumsy <<*>>= <> +import '"g-util" +)package "BOOT" + printInfo $e == for u in get("$Information","special",$e) repeat PRETTYPRINT u nil @@ -183,7 +186,7 @@ knownInfo pred == [vv,.,.]:= compMakeCategoryObject(CADR v,$e) null vv => stackSemanticError(["can't make category of ",name],nil) member(attr,vv.2) => true - x:= ASSOC(attr,vv.2) => knownInfo CADR x + x:= assoc(attr,vv.2) => knownInfo CADR x --format is a list of two elements: information, predicate false pred is ["has",name,cat] => @@ -200,7 +203,7 @@ knownInfo pred == --catlist := SUBST(name,'$,vv.4) null vv => stackSemanticError(["can't make category of ",name],nil) member(cat,first catlist) => true --checks princ. ancestors - (u:=ASSOC(cat,CADR catlist)) and knownInfo(CADR u) => true + (u:=assoc(cat,CADR catlist)) and knownInfo(CADR u) => true -- previous line checks fundamental anscestors, we should check their -- principal anscestors but this requires instantiating categories @@ -245,7 +248,7 @@ actOnInfo(u,$e) == --there is nowhere %else that this sort of thing exists u is ["SIGNATURE",name,operator,modemap] => implem:= - (implem:=ASSOC([name,:modemap],get(operator,'modemap,$e))) => + (implem:=assoc([name,:modemap],get(operator,'modemap,$e))) => CADADR implem ['ELT,name,nil] $e:= addModemap(operator,name,modemap,true,implem,$e) @@ -271,7 +274,7 @@ actOnInfo(u,$e) == -- SAY("augmenting ",name,": ",cat) -- put(name, "value", (vval, cat, venv), $e) member(cat,first ocatvec.4) or - ASSOC(cat,CADR ocatvec.4) is [.,'T,.] => $e + assoc(cat,CADR ocatvec.4) is [.,'T,.] => $e --SAY("Category extension error: --cat shouldn't be a join --what was being asserted is an ancestor of what was known diff --git a/src/interp/iterator.boot.pamphlet b/src/interp/iterator.boot.pamphlet index 52dae4f7..74eccf2e 100644 --- a/src/interp/iterator.boot.pamphlet +++ b/src/interp/iterator.boot.pamphlet @@ -50,6 +50,9 @@ <<*>>= <> +import '"g-util" +)package "BOOT" + --% ITERATORS compReduce(form,m,e) == diff --git a/src/interp/modemap.boot.pamphlet b/src/interp/modemap.boot.pamphlet index e5af0fac..a493a61f 100644 --- a/src/interp/modemap.boot.pamphlet +++ b/src/interp/modemap.boot.pamphlet @@ -50,6 +50,10 @@ <<*>>= <> +import '"c-util" +import '"info" +)package "BOOT" + --% EXTERNAL ROUTINES --These functions are called from outside this file to add a domain @@ -111,6 +115,22 @@ getModemapListFromDomain(op,numOfArgs,D,e) == [mm for (mm:= [[dc,:sig],:.]) in get(op,'modemap,e) | dc=D and #rest sig= numOfArgs] + + +insertModemap(new,mmList) == + null mmList => [new] +--isMoreSpecific(new,old:= first mmList) => [new,:mmList] +--[old,:insertModemap(new,rest mmList)] + [new,:mmList] + +addModemap(op,mc,sig,pred,fn,$e) == + $InteractiveMode => $e + if knownInfo pred then pred:=true + $insideCapsuleFunctionIfTrue=true => + $CapsuleModemapFrame := + addModemap0(op,mc,sig,pred,fn,$CapsuleModemapFrame) + $e + addModemap0(op,mc,sig,pred,fn,$e) addModemapKnown(op,mc,sig,pred,fn,$e) == -- if knownInfo pred then pred:=true @@ -173,7 +193,7 @@ addModemap1(op,mc,sig,pred,fn,e) == mkNewModemapList(mc,sig,pred,fn,curModemapList,e,filenameOrNil) == entry:= [map:= [mc,:sig],[pred,fn],:filenameOrNil] member(entry,curModemapList) => curModemapList - (oldMap:= ASSOC(map,curModemapList)) and oldMap is [.,[opred, =fn],:.] => + (oldMap:= assoc(map,curModemapList)) and oldMap is [.,[opred, =fn],:.] => $forceAdd => mergeModemap(entry,curModemapList,e) opred=true => curModemapList if pred^=true and pred^=opred then pred:= ["OR",pred,opred] @@ -257,7 +277,7 @@ augModemapsFromCategoryRep(domainName,repDefn,functorBody,categoryForm,e) == e:= putDomainsInScope(domainName,e) $base:= 4 for [lhs:=[op,sig,:.],cond,fnsel] in fnAlist repeat - u:=ASSOC(SUBST('Rep,domainName,lhs),repFnAlist) + u:=assoc(SUBST('Rep,domainName,lhs),repFnAlist) u and not AMFCR_,redefinedList(op,functorBody) => fnsel':=CADDR u e:= addModemap(op,domainName,sig,cond,fnsel',e) diff --git a/src/interp/msgdb.boot.pamphlet b/src/interp/msgdb.boot.pamphlet index 1535d8cc..842d9e82 100644 --- a/src/interp/msgdb.boot.pamphlet +++ b/src/interp/msgdb.boot.pamphlet @@ -94,15 +94,18 @@ above for examples. <<*>>= <> +import '"g-util" +)package "BOOT" + --% Message Database Code and Message Utility Functions -SETANDFILEQ($msgDatabase,NIL) -SETANDFILEQ($cacheMessages,'T) -- for debugging purposes -SETANDFILEQ($msgAlist,NIL) -SETANDFILEQ($msgDatabaseName,NIL) -SETANDFILEQ($testingErrorPrefix, '"Daly Bug") +$msgDatabase := NIL +$cacheMessages := 'T -- for debugging purposes +$msgAlist := NIL +$msgDatabaseName := NIL +$testingErrorPrefix := '"Daly Bug" -SETANDFILEQ($texFormatting, false) +$texFormatting := false --% Accessing the Database @@ -353,7 +356,7 @@ throwKeyedMsg(key,args) == throwKeyedMsg1(key, args) saturnThrowKeyedMsg(key,args) == - _*STANDARD_-OUTPUT_* : fluid := $texOutputStream + SETQ(_*STANDARD_-OUTPUT_*, $texOutputStream) last := pushSatOutput("line") sayString '"\bgroup\color{red}\begin{list}\item{} " sayKeyedMsgAsTeX(key,args) @@ -362,7 +365,7 @@ saturnThrowKeyedMsg(key,args) == spadThrow() throwKeyedMsg1(key,args) == - _*STANDARD_-OUTPUT_* : fluid := $texOutputStream + SETQ(_*STANDARD_-OUTPUT_*, $texOutputStream) sayMSG '" " if $testingSystem then sayMSG $testingErrorPrefix sayKeyedMsg(key,args) @@ -395,7 +398,7 @@ keyedSystemError(key,args) == keyedSystemError1(key, args) saturnKeyedSystemError(key, args) == - _*STANDARD_-OUTPUT_* : fluid := $texOutputStream + SETQ(_*STANDARD_-OUTPUT_*, $texOutputStream) sayString '"\bgroup\color{red}" sayString '"\begin{verbatim}" sayKeyedMsg("S2GE0000",NIL) diff --git a/src/interp/sys-globals.boot b/src/interp/sys-globals.boot index 1e185a4e..77644a6b 100644 --- a/src/interp/sys-globals.boot +++ b/src/interp/sys-globals.boot @@ -415,3 +415,6 @@ _*HASCATEGORY_-HASH_* := nil _*ANCESTORS_-HASH_* := nil +++ +_*BUILD_-VERSION_* := nil +_*YEARWEEK_* := nil -- cgit v1.2.3