diff --git a/books/bookvol9.pamphlet b/books/bookvol9.pamphlet index c51a6af..2e11891 100644 --- a/books/bookvol9.pamphlet +++ b/books/bookvol9.pamphlet @@ -6930,6 +6930,70 @@ $\rightarrow$ \end{chunk} +\defun{compFunctorBody}{compFunctorBody} +\calls{compFunctorBody}{bootStrapError} +\calls{compFunctorBody}{compOrCroak} +\uses{compFunctorBody}{/editfile} +\usesdollar{compFunctorBody}{NRTaddForm} +\usesdollar{compFunctorBody}{functorForm} +\usesdollar{compFunctorBody}{bootStrapMode} +\begin{chunk}{defun compFunctorBody} +(defun |compFunctorBody| (form mode env parForm) + (declare (ignore parForm)) + (let (tt) + (declare (special |$NRTaddForm| |$functorForm| |$bootStrapMode| /editfile)) + (if |$bootStrapMode| + (list (|bootStrapError| |$functorForm| /editfile) mode env) + (progn + (setq tt (|compOrCroak| form mode env)) + (if (and (pairp form) (member (qcar form) '(|add| capsule))) + tt + (progn + (setq |$NRTaddForm| + (if (and (pairp form) (eq (qcar form) '|SubDomain|) + (pairp (qcdr form)) (pairp (qcdr (qcdr form))) + (eq (qcdr (qcdr (qcdr form))) nil)) + (qcar (qcdr form)) + form)) + tt)))))) + +\end{chunk} + +\defun{reportOnFunctorCompilation}{reportOnFunctorCompilation} +\calls{reportOnFunctorCompilation}{displayMissingFunctions} +\calls{reportOnFunctorCompilation}{sayBrightly} +\calls{reportOnFunctorCompilation}{displaySemanticErrors} +\calls{reportOnFunctorCompilation}{displayWarnings} +\calls{reportOnFunctorCompilation}{addStats} +\calls{reportOnFunctorCompilation}{normalizeStatAndStringify} +\usesdollar{reportOnFunctorCompilation}{op} +\usesdollar{reportOnFunctorCompilation}{functorStats} +\usesdollar{reportOnFunctorCompilation}{functionStats} +\usesdollar{reportOnFunctorCompilation}{warningStack} +\usesdollar{reportOnFunctorCompilation}{semanticErrorStack} +\begin{chunk}{defun reportOnFunctorCompilation} +(defun |reportOnFunctorCompilation| () + (declare (special |$op| |$functorStats| |$functionStats| + |$warningStack| |$semanticErrorStack|)) + (|displayMissingFunctions|) + (when |$semanticErrorStack| (|sayBrightly| " ")) + (|displaySemanticErrors|) + (when |$warningStack| (|sayBrightly| " ")) + (|displayWarnings|) + (setq |$functorStats| (|addStats| |$functorStats| |$functionStats|)) + (|sayBrightly| + (cons '|%l| + (append (|bright| " Cumulative Statistics for Constructor") + (list |$op|)))) + (|sayBrightly| + (cons " Time:" + (append (|bright| (|normalizeStatAndStringify| (second |$functorStats|))) + (list "seconds")))) + (|sayBrightly| " ") + '|done|) + +\end{chunk} + \section{Indirect called comp routines} In the {\bf compExpression} function there is the code: \begin{verbatim} @@ -16086,6 +16150,7 @@ if \verb|$InteractiveMode| then use a null outputstream \getchunk{defun compForm} \getchunk{defun compForm1} \getchunk{defun compForm2} +\getchunk{defun compFunctorBody} \getchunk{defun compHas} \getchunk{defun compIf} \getchunk{defun compileFileQuietly} @@ -16413,6 +16478,7 @@ if \verb|$InteractiveMode| then use a null outputstream \getchunk{defun recompile-lib-file-if-necessary} \getchunk{defun /rf-1} \getchunk{defun removeSuperfluousMapping} +\getchunk{defun reportOnFunctorCompilation} \getchunk{defun /RQ,LIB} \getchunk{defun setDefOp} diff --git a/changelog b/changelog index 94461d6..38bf18b 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +20110528 tpd src/axiom-website/patches.html 20110528.01.tpd.patch +20110528 tpd src/interp/define.lisp treeshake compiler +20110528 tpd books/bookvol9 treeshake compiler 20110527 tpd src/axiom-website/patches.html 20110527.02.tpd.patch 20110527 tpd src/axiom-website/download.html add ubuntu 20110527 tpd src/axiom-website/patches.html 20110527.01.tpd.patch diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 435ab95..11cb988 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3514,5 +3514,7 @@ In process, not yet released

Makefile.pamphlet VERSION = May 2011
20110527.02.tpd.patch src/axiom-website/download.html add ubuntu
+20110528.01.tpd.patch +books/bookvol9 treeshake compiler
diff --git a/src/interp/define.lisp.pamphlet b/src/interp/define.lisp.pamphlet index 8e88292..3a2c970 100644 --- a/src/interp/define.lisp.pamphlet +++ b/src/interp/define.lisp.pamphlet @@ -12,99 +12,6 @@ \begin{chunk}{*} (IN-PACKAGE "BOOT" ) -;--HACK to get rid of nil attibutes ---NOTE: nil is RENAMED to NIL -;compFunctorBody(body,m,e,parForm) == -; $bootStrapMode = true => -; [bootStrapError($functorForm, _/EDITFILE),m,e] -; T:= compOrCroak(body,m,e) -; body is [op,:.] and MEMQ(op,'(add CAPSULE)) => T -; $NRTaddForm := -; body is ["SubDomain",domainForm,predicate] => domainForm -; body -; T - -(DEFUN |compFunctorBody| (|body| |m| |e| |parForm|) - (declare (ignore |parForm|)) - (PROG (T$ |op| |ISTMP#1| |domainForm| |ISTMP#2| |predicate|) - (declare (special |$NRTaddForm| |$functorForm| |$bootStrapMode| /EDITFILE)) - (RETURN - (COND - ((BOOT-EQUAL |$bootStrapMode| 'T) - (CONS (|bootStrapError| |$functorForm| /EDITFILE) - (CONS |m| (CONS |e| NIL)))) - ('T (SPADLET T$ (|compOrCroak| |body| |m| |e|)) - (COND - ((AND (PAIRP |body|) (PROGN (SPADLET |op| (QCAR |body|)) 'T) - (member |op| '(|add| CAPSULE))) - T$) - ('T - (SPADLET |$NRTaddForm| - (COND - ((AND (PAIRP |body|) - (EQ (QCAR |body|) '|SubDomain|) - (PROGN - (SPADLET |ISTMP#1| (QCDR |body|)) - (AND (PAIRP |ISTMP#1|) - (PROGN - (SPADLET |domainForm| - (QCAR |ISTMP#1|)) - (SPADLET |ISTMP#2| - (QCDR |ISTMP#1|)) - (AND (PAIRP |ISTMP#2|) - (EQ (QCDR |ISTMP#2|) NIL) - (PROGN - (SPADLET |predicate| - (QCAR |ISTMP#2|)) - 'T)))))) - |domainForm|) - ('T |body|))) - T$))))))) - -;reportOnFunctorCompilation() == -; displayMissingFunctions() -; if $semanticErrorStack then sayBrightly '" " -; displaySemanticErrors() -; if $warningStack then sayBrightly '" " -; displayWarnings() -; $functorStats:= addStats($functorStats,$functionStats) -; [byteCount,elapsedSeconds] := $functorStats -; sayBrightly ['%l,:bright '" Cumulative Statistics for Constructor", -; $op] -; timeString := normalizeStatAndStringify elapsedSeconds -; sayBrightly ['" Time:",:bright timeString,'"seconds"] -; sayBrightly '" " -; 'done - -(DEFUN |reportOnFunctorCompilation| () - (PROG (|byteCount| |elapsedSeconds| |timeString|) - (declare (special |$op| |$functorStats| |$functionStats| |$warningStack| - |$semanticErrorStack|)) - (RETURN - (PROGN - (|displayMissingFunctions|) - (COND - (|$semanticErrorStack| (|sayBrightly| " "))) - (|displaySemanticErrors|) - (COND (|$warningStack| (|sayBrightly| " "))) - (|displayWarnings|) - (SPADLET |$functorStats| - (|addStats| |$functorStats| |$functionStats|)) - (SPADLET |byteCount| (CAR |$functorStats|)) - (SPADLET |elapsedSeconds| (CADR |$functorStats|)) - (|sayBrightly| - (CONS '|%l| - (APPEND (|bright| - " Cumulative Statistics for Constructor") - (CONS |$op| NIL)))) - (SPADLET |timeString| - (|normalizeStatAndStringify| |elapsedSeconds|)) - (|sayBrightly| - (CONS " Time:" - (APPEND (|bright| |timeString|) - (CONS "seconds" NIL)))) - (|sayBrightly| " ") - '|done|)))) - ;displayMissingFunctions() == ; null $CheckVectorList => nil ; loc := nil