diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index cc36e5a..1301f29 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -34526,29 +34526,40 @@ o )library \defun{/rq}{/rq} \calls{/rq}{/rf-1} -\uses{/rq}{Echo-Meta} +\uses{/rq}{echo-meta} <>= -(defun /RQ (&rest foo &aux (Echo-Meta nil)) +(defun /RQ (&rest foo &aux (echo-meta nil)) (declare (special Echo-Meta) (ignore foo)) (/rf-1 nil)) @ +\defun{/rf}{/rf} +Compile with noisy output +\calls{/rf}{/rf-1} +\uses{/rf}{echo-meta} +<>= +(defun /rf (&rest foo &aux (echo-meta t)) + (declare (special echo-meta) (ignore foo)) + (/rf-1 nil)) + +@ + \defun{/rf-1}{/rf-1} \calls{/rf-1}{ncINTERPFILE} \usesdollar{/rf-1}{useNewParser} \uses{/rf-1}{/editfile} -\uses{/rf-1}{Echo-Meta} +\uses{/rf-1}{echo-meta} <>= (defun /rf-1 (ignore) (declare (ignore ignore)) (let* ((input-file (makeInputFilename /editfile)) (type (pathname-type input-file))) - (declare (special |$useNewParser| Echo-Meta /editfile)) + (declare (special |$useNewParser| echo-meta /editfile)) (cond ((string= type "lisp") (load input-file)) ((and (string= type "input") |$useNewParser|) - (|ncINTERPFILE| input-file Echo-Meta)) + (|ncINTERPFILE| input-file echo-meta)) (t (spad input-file))))) @ @@ -40787,6 +40798,7 @@ This needs to work off the internal exposure list, not the file. <> <> <> +<> <> <> <> diff --git a/books/bookvol9.pamphlet b/books/bookvol9.pamphlet index cff3e35..c6d12f9 100644 --- a/books/bookvol9.pamphlet +++ b/books/bookvol9.pamphlet @@ -518,12 +518,12 @@ is called. For Aldor, You must also have present a {\tt .asy} generated from the same source file. \defunsec{compiler}{The top level compiler command} -\calls{compiler}{vol5/helpSpad2Cmd} -\calls{compiler}{vol5/selectOptionLC} -\calls{compiler}{vol5/pathname} -\calls{compiler}{vol5/mergePathnames} -\calls{compiler}{vol5/pathnameType} -\calls{compiler}{vol5/namestring} +\calls{compiler}{helpSpad2Cmd(5)} +\calls{compiler}{selectOptionLC(5)} +\calls{compiler}{pathname(5)} +\calls{compiler}{mergePathnames(5)} +\calls{compiler}{pathnameType(5)} +\calls{compiler}{namestring(5)} \calls{compiler}{throwKeyedMsg} \calls{compiler}{findfile} \calls{compiler}{compileSpad2Cmd} @@ -636,12 +636,12 @@ a file with file extension .spad. The \verb|$f| and \verb|$m| are compiler variables, probably function and mode. -\calls{compileSpad2Cmd}{vol5/pathname} -\calls{compileSpad2Cmd}{vol5/pathnameType} -\calls{compileSpad2Cmd}{vol5/namestring} -\calls{compileSpad2Cmd}{vol5/updateSourceFiles} -\calls{compileSpad2Cmd}{vol5/selectOptionLC} -\calls{compileSpad2Cmd}{vol5/terminateSystemCommand} +\calls{compileSpad2Cmd}{pathname(5)} +\calls{compileSpad2Cmd}{pathnameType(5)} +\calls{compileSpad2Cmd}{namestring(5)} +\calls{compileSpad2Cmd}{updateSourceFiles(5)} +\calls{compileSpad2Cmd}{selectOptionLC(5)} +\calls{compileSpad2Cmd}{terminateSystemCommand(5)} \calls{compileSpad2Cmd}{nequal} \calls{compileSpad2Cmd}{throwKeyedMsg} \calls{compileSpad2Cmd}{sayKeyedMsg} @@ -743,17 +743,53 @@ and mode. (|spadPrompt|))))) @ +\defun{compilerDoit}{compilerDoit} +\calls{compilerDoit}{/rq(5)} +\calls{compilerDoit}{/rf(5)} +\calls{compilerDoit}{member(5)} +\calls{compilerDoit}{sayBrightly} +\usesdollar{compilerDoit}{byConstructors} +\usesdollar{compilerDoit}{constructorsSeen} +<>= +(defun |compilerDoit| (constructor fun) + (let (|$byConstructors| |$constructorsSeen|) + (declare (special |$byConstructors| |$constructorsSeen|)) + (cond + ((equal fun '(|rf| |lib|)) (|/RQ,LIB|)) ; Ignore "noquiet" + ((equal fun '(|rf| |nolib|)) (/rf)) + ((equal fun '(|rq| |lib|)) (|/RQ,LIB|)) + ((equal fun '(|rq| |nolib|)) (/rq)) + ((equal fun '(|c| |lib|)) + (setq |$byConstructors| (loop for x in constructor collect (|opOf| x))) + (|/RQ,LIB|) + (dolist (x |$byConstructors|) + (unless (|member| x |$constructorsSeen|) + (|sayBrightly| `(">>> Warning " |%b| ,x |%d| " was not found")))))))) + +@ +\defun{/RQ,LIB}{/RQ,LIB} +Compile a library quietly +\calls{/RQ,LIB}{/rf-1(5)} +\uses{/RQ,LIB}{echo-meta(5)} +\usesdollar{/RQ,LIB}{lisplib} +<>= +(defun |/RQ,LIB| (&rest foo &aux (echo-meta nil) ($lisplib t)) + (declare (special echo-meta $lisplib)) + (/rf-1 nil)) + +@ + \defun{compileSpadLispCmd}{compileSpadLispCmd} -\calls{compileSpadLispCmd}{vol5/pathname} -\calls{compileSpadLispCmd}{vol5/pathnameType} -\calls{compileSpadLispCmd}{vol5/selectOptionLC} -\calls{compileSpadLispCmd}{vol5/namestring} -\calls{compileSpadLispCmd}{vol5/terminateSystemCommand} -\calls{compileSpadLispCmd}{vol5/fnameMake} -\calls{compileSpadLispCmd}{vol5/pathnameDirectory} -\calls{compileSpadLispCmd}{vol5/pathnameName} -\calls{compileSpadLispCmd}{vol5/fnameReadable?} -\calls{compileSpadLispCmd}{vol5/localdatabase} +\calls{compileSpadLispCmd}{pathname(5)} +\calls{compileSpadLispCmd}{pathnameType(5)} +\calls{compileSpadLispCmd}{selectOptionLC(5)} +\calls{compileSpadLispCmd}{namestring(5)} +\calls{compileSpadLispCmd}{terminateSystemCommand(5)} +\calls{compileSpadLispCmd}{fnameMake(5)} +\calls{compileSpadLispCmd}{pathnameDirectory(5)} +\calls{compileSpadLispCmd}{pathnameName(5)} +\calls{compileSpadLispCmd}{fnameReadable?(5)} +\calls{compileSpadLispCmd}{localdatabase(5)} \calls{compileSpadLispCmd}{throwKeyedMsg} \calls{compileSpadLispCmd}{object2String} \calls{compileSpadLispCmd}{sayKeyedMsg} @@ -806,7 +842,7 @@ and mode. @ \defun{compileAsharpCmd}{compileAsharpCmd} -\calls{compileAsharpCmd}{vol5/terminateSystemCommand} +\calls{compileAsharpCmd}{terminateSystemCommand(5)} \calls{compileAsharpCmd}{compileAsharpCmd1} \calls{compileAsharpCmd}{spadPrompt} <>= @@ -818,15 +854,15 @@ and mode. @ \defun{compileAsharpCmd1}{compileAsharpCmd1} -\calls{compileAsharpCmd1}{vol5/pathname} -\calls{compileAsharpCmd1}{vol5/pathnameType} -\calls{compileAsharpCmd1}{vol5/fnameMake} -\calls{compileAsharpCmd1}{vol5/namestring} -\calls{compileAsharpCmd1}{vol5/selectOptionLC} -\calls{compileAsharpCmd1}{vol5/pathnameName} -\calls{compileAsharpCmd1}{vol5/fnameReadable?} -\calls{compileAsharpCmd1}{vol5/updateSourceFiles} -\calls{compileAsharpCmd1}{vol5/getenviron} +\calls{compileAsharpCmd1}{pathname(5)} +\calls{compileAsharpCmd1}{pathnameType(5)} +\calls{compileAsharpCmd1}{fnameMake(5)} +\calls{compileAsharpCmd1}{namestring(5)} +\calls{compileAsharpCmd1}{selectOptionLC(5)} +\calls{compileAsharpCmd1}{pathnameName(5)} +\calls{compileAsharpCmd1}{fnameReadable?(5)} +\calls{compileAsharpCmd1}{updateSourceFiles(5)} +\calls{compileAsharpCmd1}{getenviron(5)} \calls{compileAsharpCmd1}{nequal} \calls{compileAsharpCmd1}{throwKeyedMsg} \calls{compileAsharpCmd1}{error} @@ -935,11 +971,11 @@ and mode. @ \defun{compileAsharpArchiveCmd}{compileAsharpArchiveCmd} -\calls{compileAsharpArchiveCmd}{vol5/pathname} -\calls{compileAsharpArchiveCmd}{vol5/terminateSystemCommand} -\calls{compileAsharpArchiveCmd}{vol5/namestring} -\calls{compileAsharpArchiveCmd}{vol5/fnameMake} -\calls{compileAsharpArchiveCmd}{vol5/pathnameName} +\calls{compileAsharpArchiveCmd}{pathname(5)} +\calls{compileAsharpArchiveCmd}{terminateSystemCommand(5)} +\calls{compileAsharpArchiveCmd}{namestring(5)} +\calls{compileAsharpArchiveCmd}{fnameMake(5)} +\calls{compileAsharpArchiveCmd}{pathnameName(5)} \calls{compileAsharpArchiveCmd}{throwKeyedMsg} \calls{compileAsharpArchiveCmd}{directoryp} \calls{compileAsharpArchiveCmd}{nequal} @@ -996,15 +1032,15 @@ and mode. @ \defun{compileAsharpLispCmd}{compileAsharpLispCmd} -\calls{compileAsharpLispCmd}{vol5/pathname} -\calls{compileAsharpLispCmd}{vol5/namestring} -\calls{compileAsharpLispCmd}{vol5/selectOptionLC} -\calls{compileAsharpLispCmd}{vol5/terminateSystemCommand} -\calls{compileAsharpLispCmd}{vol5/pathnameType} -\calls{compileAsharpLispCmd}{vol5/fnameMake} -\calls{compileAsharpLispCmd}{vol5/pathnameDirectory} -\calls{compileAsharpLispCmd}{vol5/pathnameName} -\calls{compileAsharpLispCmd}{vol5/fnameReadable?} +\calls{compileAsharpLispCmd}{pathname(5)} +\calls{compileAsharpLispCmd}{namestring(5)} +\calls{compileAsharpLispCmd}{selectOptionLC(5)} +\calls{compileAsharpLispCmd}{terminateSystemCommand(5)} +\calls{compileAsharpLispCmd}{pathnameType(5)} +\calls{compileAsharpLispCmd}{fnameMake(5)} +\calls{compileAsharpLispCmd}{pathnameDirectory(5)} +\calls{compileAsharpLispCmd}{pathnameName(5)} +\calls{compileAsharpLispCmd}{fnameReadable?(5)} \calls{compileAsharpLispCmd}{throwKeyedMsg} \calls{compileAsharpLispCmd}{strconc} \calls{compileAsharpLispCmd}{object2String} @@ -1059,7 +1095,7 @@ and mode. @ \defun{withAsharpCmd}{withAsharpCmd} -\calls{withAsharpCmd}{vol5/localdatabase} +\calls{withAsharpCmd}{localdatabase(5)} \usesdollar{withAsharpCmd}{options} <>= (defun |withAsharpCmd| (args) @@ -1093,32 +1129,6 @@ if \verb|$InteractiveMode| then use a null outputstream (defvar |$constructorsSeen| () "list of constructors found") @ -\defun{compilerDoit}{compilerDoit} -\calls{compilerDoit}{vol5/member} -\calls{compilerDoit}{/RQ,LIB} -\calls{compilerDoit}{sayBrightly} -\usesdollar{compilerDoit}{byConstructors} -\usesdollar{compilerDoit}{constructorsSeen} -<>= -(defun |compilerDoit| (constructor fun) - (let (|$byConstructors| |$constructorsSeen|) - (declare (special |$byConstructors| |$constructorsSeen|)) - (setq |$byConstructors| nil) - (setq |$constructorsSeen| nil) - (cond - ((equal fun '(|rf| |lib|)) (|/RQ,LIB|)) - ((equal fun '(|rf| |nolib|)) (/rf)) - ((equal fun '(|rq| |lib|)) (|/RQ,LIB|)) - ((equal fun '(|rq| |nolib|)) (/rq)) - ((equal fun '(|c| |lib|)) - (setq |$byConstructors| (mapcar #'|opOf| constructor)) - (|/RQ,LIB|) - (dolist (con |$byConstructors|) - (unless (|member| con |$constructorsSeen|) - (|sayBrightly| `(">>> Warning " |%b| ,con |%d| " was not found")))))))) - -@ - \chapter{The Compiler} <>= (in-package "BOOT") @@ -1134,6 +1144,7 @@ if \verb|$InteractiveMode| then use a null outputstream <> <> <> +<> <> @ diff --git a/changelog b/changelog index c3b1540..67b7b6f 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,8 @@ +20100814 tpd src/axiom-website/patches.html 20100814.02.tpd.patch +20100814 tpd src/interp/patches.lisp treeshake the compile code +20100814 tpd src/interp/compiler.lisp treeshake the compiler code +20100814 tpd books/bookvol5 treeshake the compiler code +20100814 tpd books/bookvol9 treeshake the compiler code 20100814 tpd src/axiom-website/patches.html 20100814.01.tpd.patch 20100814 tpd books/bookvol9 cross-reference functions and variables 20100814 tpd books/bookvol5 remove compile, duplicated in vol9 diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index fac558a..0892fd3 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3063,5 +3063,7 @@ books/bookvol10.4 remove POLYVEC
src/axiom-website/download.html update ubuntu yum advice
20100814.01.tpd.patch books/bookvol9 cross-reference functions and variables
+20100814.02.tpd.patch +books/bookvol9 treeshake the compiler code
diff --git a/src/interp/compiler.lisp.pamphlet b/src/interp/compiler.lisp.pamphlet index a939292..808f915 100644 --- a/src/interp/compiler.lisp.pamphlet +++ b/src/interp/compiler.lisp.pamphlet @@ -6540,79 +6540,6 @@ should only be used in the old (preWATT) compiler (SHUT |$outStream|) (|mkCheck|) '|done|)))))) @ -\subsection{compilerDoit} -<<*>>= -;compilerDoit(constructor, fun) == -; $byConstructors : local := [] -; $constructorsSeen : local := [] -; fun = ['rf, 'lib] => _/RQ_,LIB() -- Ignore "noquiet". -; fun = ['rf, 'nolib] => _/RF() -; fun = ['rq, 'lib] => _/RQ_,LIB() -; fun = ['rq, 'nolib] => _/RQ() -; fun = ['c, 'lib] => -; $byConstructors := [opOf x for x in constructor] -; _/RQ_,LIB() -; for ii in $byConstructors repeat -; null MEMBER(ii,$constructorsSeen) => -; sayBrightly ['">>> Warning ",'%b,ii,'%d,'" was not found"] - -(DEFUN |compilerDoit| (|constructor| |fun|) - (PROG (|$byConstructors| |$constructorsSeen|) - (DECLARE (SPECIAL |$byConstructors| |$constructorsSeen|)) - (RETURN - (SEQ (PROGN - (SPADLET |$byConstructors| NIL) - (SPADLET |$constructorsSeen| NIL) - (COND - ((BOOT-EQUAL |fun| (CONS '|rf| (CONS '|lib| NIL))) - (|/RQ,LIB|)) - ((BOOT-EQUAL |fun| (CONS '|rf| (CONS '|nolib| NIL))) - (/RF)) - ((BOOT-EQUAL |fun| (CONS '|rq| (CONS '|lib| NIL))) - (|/RQ,LIB|)) - ((BOOT-EQUAL |fun| (CONS '|rq| (CONS '|nolib| NIL))) - (/RQ)) - ((BOOT-EQUAL |fun| (CONS '|c| (CONS '|lib| NIL))) - (PROGN - (SPADLET |$byConstructors| - (PROG (G170852) - (SPADLET G170852 NIL) - (RETURN - (DO ((G170857 |constructor| - (CDR G170857)) - (|x| NIL)) - ((OR (ATOM G170857) - (PROGN - (SETQ |x| (CAR G170857)) - NIL)) - (NREVERSE0 G170852)) - (SEQ (EXIT - (SETQ G170852 - (CONS (|opOf| |x|) G170852)))))))) - (|/RQ,LIB|) - (SEQ (DO ((G170866 |$byConstructors| - (CDR G170866)) - (|ii| NIL)) - ((OR (ATOM G170866) - (PROGN - (SETQ |ii| (CAR G170866)) - NIL)) - NIL) - (SEQ (EXIT (COND - ((NULL - (|member| |ii| - |$constructorsSeen|)) - (EXIT - (|sayBrightly| - (CONS - ">>> Warning " - (CONS '|%b| - (CONS |ii| - (CONS '|%d| - (CONS " was not found" - NIL))))))))))))))))))))) - -@ \subsection{compilerDoitWithScreenedLisplib} <<*>>= ;compilerDoitWithScreenedLisplib(constructor, fun) == diff --git a/src/interp/patches.lisp.pamphlet b/src/interp/patches.lisp.pamphlet index 47a7196..05d2107 100644 --- a/src/interp/patches.lisp.pamphlet +++ b/src/interp/patches.lisp.pamphlet @@ -178,12 +178,6 @@ It used to read: (setq *print-escape* nil) ;; so stringimage doesn't escape idents? #+(or :IEEE-FLOATING-POINT) (setq system:*print-nans* T) -(defun /RF (&rest foo &aux (Echo-Meta 'T)) - (declare (special Echo-Meta)) - (/RF-1 nil)) -(defun |/RQ,LIB| (&rest foo &aux (Echo-Meta nil) ($LISPLIB T)) - (declare (special Echo-Meta $LISPLIB)) - (/RF-1 nil)) (defun /EF (&rest foo) (obey (concat "vi " (namestring (vmlisp::make-input-filename /EDITFILE)))))