Skip to content

Commit

Permalink
fix issue #174
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiek committed Mar 25, 2024
1 parent d4f1bc6 commit d74ff2d
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions book.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

\def\racketEd{0}
\def\pythonEd{1}
\def\edition{0}
\def\edition{1}

% material that is specific to the Racket edition of the book
\newcommand{\racket}[1]{{\if\edition\racketEd{#1}\fi}}
Expand Down Expand Up @@ -15945,26 +15945,21 @@ \section{Explicate Control and the \LangCFun{} Language}
%% \racket{(The concrete syntax is given in
%% figure~\ref{fig:c3-concrete-syntax} of the Appendix.)}
%
The auxiliary functions for assignment\racket{ and tail contexts} should
be updated with cases for
\racket{\code{Apply}}\python{\code{Call}} and \code{FunRef} and the
function for predicate context should be updated for
\racket{The auxiliary functions for assignment and tail contexts should
be updated with cases for \code{Apply} and \code{FunRef}.}
The auxiliary function for predicate context should be updated for
\racket{\code{Apply}}\python{\code{Call}} but not \code{FunRef}. (A
\code{FunRef} cannot be a Boolean.)

In assignment and predicate contexts,
%
\racket{\code{Apply} becomes \code{Call}, whereas
in tail position \code{Apply} becomes \code{TailCall}}
%
\python{\code{Call} remains \code{Call}, whereas
in tail position \code{Call} becomes \code{TailCall}}.
\racket{In assignment and predicate contexts,
\code{Apply} becomes \code{Call}, whereas
in tail position \code{Apply} becomes \code{TailCall}.}
%
We recommend defining a new auxiliary function for processing function
definitions. This code is similar to the case for \code{Program} in
\LangVec{}. The top-level \code{explicate\_control} function that
handles the \code{ProgramDefs} form of \LangFun{} can then apply this
new function to all the function definitions.
handles the \code{ProgramDefs} form of \LangFun{} can apply this
new function to all function definitions.

{\if\edition\pythonEd\pythonColor

Expand Down Expand Up @@ -23763,7 +23758,7 @@ \section{x86 Instruction Set Quick Reference}
\texttt{subq} $A$, $B$ & $B - A \to B$\\
\texttt{imulq} $A$, $B$ & $A \times B \to B$ ($B$ must be a register).\\
\texttt{callq} $L$ & Pushes the return address and jumps to label $L$. \\
\texttt{callq} \texttt{*}$A$ & Calls the function at the address $A$. \\
\texttt{callq} \texttt{*}$A$ & Pushes the return address and jumps to the address in $A$. \\
\texttt{retq} & Pops the return address and jumps to it. \\
\texttt{popq} $A$ & $*\texttt{rsp} \to A;\, \texttt{rsp} + 8 \to \texttt{rsp}$ \\
\texttt{pushq} $A$ & $\texttt{rsp} - 8 \to \texttt{rsp};\, A \to *\texttt{rsp}$\\
Expand Down

0 comments on commit d74ff2d

Please sign in to comment.