diff --git a/books/bookvol9.pamphlet b/books/bookvol9.pamphlet
index f488f0d..9a3cf30 100644
--- a/books/bookvol9.pamphlet
+++ b/books/bookvol9.pamphlet
@@ -6097,6 +6097,108 @@ $\rightarrow$
\end{chunk}
+\defun{getTargetFromRhs}{getTargetFromRhs}
+\calls{getTargetFromRhs}{stackSemanticError}
+\calls{getTargetFromRhs}{getTargetFromRhs}
+\calls{getTargetFromRhs}{compOrCroak}
+\begin{chunk}{defun getTargetFromRhs}
+(defun |getTargetFromRhs| (lhs rhs env)
+ (declare (special |$EmptyMode|))
+ (cond
+ ((and (pairp rhs) (eq (qcar rhs) 'capsule))
+ (|stackSemanticError|
+ (list "target category of " lhs
+ " cannot be determined from definition")
+ nil))
+ ((and (pairp rhs) (eq (qcar rhs) '|SubDomain|) (pairp (qcdr rhs)))
+ (|getTargetFromRhs| lhs (second rhs) env))
+ ((and (pairp rhs) (eq (qcar rhs) '|add|)
+ (pairp (qcdr rhs)) (pairp (qcdr (qcdr rhs)))
+ (eq (qcdr (qcdr (qcdr rhs))) nil)
+ (pairp (qcar (qcdr (qcdr rhs))))
+ (eq (qcar (qcar (qcdr (qcdr rhs)))) 'capsule))
+ (|getTargetFromRhs| lhs (second rhs) env))
+ ((and (pairp rhs) (eq (qcar rhs) '|Record|))
+ (cons '|RecordCategory| (rest rhs)))
+ ((and (pairp rhs) (eq (qcar rhs) '|Union|))
+ (cons '|UnionCategory| (rest rhs)))
+ ((and (pairp rhs) (eq (qcar rhs) '|List|))
+ (cons '|ListCategory| (rest rhs)))
+ ((and (pairp rhs) (eq (qcar rhs) '|Vector|))
+ (cons '|VectorCategory| (rest rhs)))
+ (t
+ (second (|compOrCroak| rhs |$EmptyMode| env)))))
+
+\end{chunk}
+
+\defun{giveFormalParametersValues}{giveFormalParametersValues}
+\calls{giveFormalParametersValues}{put}
+\calls{giveFormalParametersValues}{get}
+\begin{chunk}{defun giveFormalParametersValues}
+(defun |giveFormalParametersValues| (argl env)
+ (dolist (x argl)
+ (setq env
+ (|put| x '|value|
+ (list (|genSomeVariable|) (|get| x '|mode| env) nil) env)))
+ env)
+
+\end{chunk}
+
+\defun{macroExpandInPlace}{macroExpandInPlace}
+\calls{macroExpandInPlace}{macroExpand}
+\begin{chunk}{defun macroExpandInPlace}
+(defun |macroExpandInPlace| (form env)
+ (let (y)
+ (setq y (|macroExpand| form env))
+ (if (or (atom form) (atom y))
+ y
+ (progn
+ (rplaca form (car y))
+ (rplacd form (cdr y))
+ form
+ ))))
+
+\end{chunk}
+
+\defun{macroExpand}{macroExpand}
+\calls{macroExpand}{macroExpand}
+\calls{macroExpand}{macroExpandList}
+\begin{chunk}{defun macroExpand}
+(defun |macroExpand| (form env)
+ (let (u)
+ (cond
+ ((atom form)
+ (if (setq u (|get| form '|macro| env))
+ (|macroExpand| u env)
+ form))
+ ((and (pairp form) (eq (qcar form) 'def)
+ (pairp (qcdr form))
+ (pairp (qcdr (qcdr form)))
+ (pairp (qcdr (qcdr (qcdr form))))
+ (pairp (qcdr (qcdr (qcdr (qcdr form)))))
+ (eq (qcdr (qcdr (qcdr (qcdr (qcdr form))))) nil))
+ (list 'def (|macroExpand| (second form) env)
+ (|macroExpandList| (third form) env)
+ (|macroExpandList| (fourth form) env)
+ (|macroExpand| (fifth form) env)))
+ (t (|macroExpandList| form env)))))
+
+\end{chunk}
+
+\defun{macroExpandList}{macroExpandList}
+\calls{macroExpandList}{macroExpand}
+\calls{macroExpandList}{getdatabase}
+\begin{chunk}{defun macroExpandList}
+(defun |macroExpandList| (lst env)
+ (let (tmp)
+ (if (and (pairp lst) (eq (qcdr lst) nil)
+ (identp (qcar lst)) (getdatabase (qcar lst) 'niladic)
+ (setq tmp (|get| (qcar lst) '|macro| env)))
+ (|macroExpand| tmp env)
+ (loop for x in lst collect (|macroExpand| x env)))))
+
+\end{chunk}
+
\section{Indirect called comp routines}
In the {\bf compExpression} function there is the code:
\begin{verbatim}
@@ -15319,8 +15421,10 @@ if \verb|$InteractiveMode| then use a null outputstream
\getchunk{defun get-a-line}
\getchunk{defun getScriptName}
+\getchunk{defun getTargetFromRhs}
\getchunk{defun get-token}
\getchunk{defun getToken}
+\getchunk{defun giveFormalParametersValues}
\getchunk{defun hackforis}
\getchunk{defun hackforis1}
@@ -15347,7 +15451,9 @@ if \verb|$InteractiveMode| then use a null outputstream
\getchunk{defun line-print}
\getchunk{defun line-new-line}
-\getchunk{defun postMakeCons}
+\getchunk{defun macroExpand}
+\getchunk{defun macroExpandInPlace}
+\getchunk{defun macroExpandList}
\getchunk{defun makeSimplePredicateOrNil}
\getchunk{defun make-string-adjustable}
\getchunk{defun make-symbol-of}
@@ -15527,6 +15633,7 @@ if \verb|$InteractiveMode| then use a null outputstream
\getchunk{defun postInSeq}
\getchunk{defun postIteratorList}
\getchunk{defun postJoin}
+\getchunk{defun postMakeCons}
\getchunk{defun postMapping}
\getchunk{defun postMDef}
\getchunk{defun postOp}
diff --git a/changelog b/changelog
index c9833aa..830251b 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,6 @@
+20110516 tpd src/axiom-website/patches.html 20110516.01.tpd.patch
+20110516 tpd src/interp/define.lisp treeshake compiler
+20110516 tpd books/bookvol9 treeshake compiler
20110515 tpd src/axiom-website/patches.html 20110515.01.tpd.patch
20110515 tpd src/interp/define.lisp treeshake compiler
20110515 tpd books/bookvol9 treeshake compiler
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index 8c41447..b85195a 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
@@ -3476,5 +3476,7 @@ books/bookvol* set textlength 400
books/bookvol9 normalize argument names to top level functions
20110515.01.tpd.patch
books/bookvol9 treeshake compiler
+20110516.01.tpd.patch
+books/bookvol9 treeshake compiler