소스 검색

num-params

Jeremy Siek 3 년 전
부모
커밋
ce6520193f
1개의 변경된 파일10개의 추가작업 그리고 2개의 파일을 삭제
  1. 10 2
      book.tex

+ 10 - 2
book.tex

@@ -1,4 +1,4 @@
-\documentclass[7x10]{TimesAPriori_MIT}%%7x10
+\documentclass[7x10,nocrop]{TimesAPriori_MIT}%%7x10
 
 
 % TODO:
 % TODO:
 % move binary subtraction from Lif to Lint
 % move binary subtraction from Lif to Lint
@@ -25,7 +25,7 @@
 
 
 \def\racketEd{0}
 \def\racketEd{0}
 \def\pythonEd{1}
 \def\pythonEd{1}
-\def\edition{1}
+\def\edition{0}
 
 
 % material that is specific to the Racket edition of the book
 % material that is specific to the Racket edition of the book
 \newcommand{\racket}[1]{{\if\edition\racketEd{#1}\fi}}
 \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
 registers. We recommend turning the parameters into local variables
 and generating instructions at the beginning of the function to move
 and generating instructions at the beginning of the function to move
 from the argument passing registers to these local variables.
 from the argument passing registers to these local variables.
+
 {\if\edition\racketEd
 {\if\edition\racketEd
 \begin{lstlisting}
 \begin{lstlisting}
   (Def |$f$| '([|$x_1$| : |$T_1$|] [|$x_2$| : |$T_2$|]  |$\ldots$| ) |$T_r$| |$\itm{info}$| |$B$|)
   (Def |$f$| '([|$x_1$| : |$T_1$|] [|$x_2$| : |$T_2$|]  |$\ldots$| ) |$T_r$| |$\itm{info}$| |$B$|)
@@ -14054,6 +14055,13 @@ start:
 \end{lstlisting}
 \end{lstlisting}
 \end{minipage}
 \end{minipage}
 \end{center}
 \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
 By changing the parameters to local variables, we are giving the
 register allocator control over which registers or stack locations to
 register allocator control over which registers or stack locations to
 use for them. If you implemented the move-biasing challenge
 use for them. If you implemented the move-biasing challenge