|
@@ -1,4 +1,4 @@
|
|
|
-\documentclass[7x10]{TimesAPriori_MIT}%%7x10
|
|
|
+\documentclass[7x10,nocrop]{TimesAPriori_MIT}%%7x10
|
|
|
|
|
|
% TODO:
|
|
|
% move binary subtraction from Lif to Lint
|
|
@@ -25,7 +25,7 @@
|
|
|
|
|
|
\def\racketEd{0}
|
|
|
\def\pythonEd{1}
|
|
|
-\def\edition{1}
|
|
|
+\def\edition{0}
|
|
|
|
|
|
% material that is specific to the Racket edition of the book
|
|
|
\newcommand{\racket}[1]{{\if\edition\racketEd{#1}\fi}}
|
|
@@ -14015,6 +14015,7 @@ Section~\ref{sec:fun-x86}. That is, the arguments are passed in
|
|
|
registers. We recommend turning the parameters into local variables
|
|
|
and generating instructions at the beginning of the function to move
|
|
|
from the argument passing registers to these local variables.
|
|
|
+
|
|
|
{\if\edition\racketEd
|
|
|
\begin{lstlisting}
|
|
|
(Def |$f$| '([|$x_1$| : |$T_1$|] [|$x_2$| : |$T_2$|] |$\ldots$| ) |$T_r$| |$\itm{info}$| |$B$|)
|
|
@@ -14054,6 +14055,13 @@ start:
|
|
|
\end{lstlisting}
|
|
|
\end{minipage}
|
|
|
\end{center}
|
|
|
+
|
|
|
+\racket{The interpreter for \LangXIndCall{} needs to know how many
|
|
|
+ parameters the function expects, but the parameters are no longer in
|
|
|
+ the syntax of function definitions. Instead, add an entry to
|
|
|
+ $\itm{info}$ that maps \code{num-params} to the number of parameters
|
|
|
+ to construct $\itm{info}'$.}
|
|
|
+
|
|
|
By changing the parameters to local variables, we are giving the
|
|
|
register allocator control over which registers or stack locations to
|
|
|
use for them. If you implemented the move-biasing challenge
|