浏览代码

moved discussion of adding function name to start/conclusion labels

Jeremy Siek 3 年之前
父节点
当前提交
e30abf2459
共有 2 个文件被更改,包括 10 次插入13 次删除
  1. 10 12
      book.tex
  2. 0 1
      defs.tex

+ 10 - 12
book.tex

@@ -14717,7 +14717,7 @@ start:
 $\Rightarrow$
 \begin{minipage}{0.3\textwidth}
 \begin{lstlisting}
-start:
+|$f$|start:
   movq %rdi, |$x_1$|
   movq %rsi, |$x_2$|
   |$\cdots$|
@@ -14727,6 +14727,15 @@ start:
 \end{lstlisting}
 \end{minipage}
 \end{center}
+Recall that we use the label \code{start} for the initial block of a
+program, and in Section~\ref{sec:select-Lvar} we recommend labeling
+the conclusion of the program with \code{conclusion}, so that
+$\RETURN{Arg}$ can be compiled to an assignment to \code{rax} followed
+by a jump to \code{conclusion}. With the addition of function
+definitions, there is a start block and conclusion for each function,
+but their labels need to be unique. We recommend prepending the
+function's name to \code{start} and \code{conclusion}, respectively,
+to obtain unique labels.
 
 \racket{The interpreter for \LangXIndCall{} needs to know how many
   parameters the function expects, but the parameters are no longer in
@@ -14783,17 +14792,6 @@ means ``pop the frame and then do an indirect jump'', which we name
 argument that specifies where to jump and an integer that represents
 the arity of the function being called.
 
-Recall that we use the label \code{start} for the initial block of a
-program, and in Section~\ref{sec:select-Lvar} we recommend labeling
-the conclusion of the program with \code{conclusion}, so that
-$\RETURN{Arg}$ can be compiled to an assignment to \code{rax} followed
-by a jump to \code{conclusion}. With the addition of function
-definitions, there is a start block and conclusion for each function,
-but their labels need to be unique. We recommend prepending the
-function's name to \code{start} and \code{conclusion}, respectively,
-to obtain unique labels.
-
-
 \section{Register Allocation}
 \label{sec:register-allocation-r4}
 

+ 0 - 1
defs.tex

@@ -302,7 +302,6 @@
 \newcommand{\CSUB}[2]{\LP\key{-}~#1~#2\RP}
 \newcommand{\CWHILE}[2]{\LP\key{while}~#1~#2\RP}
 \newcommand{\WHILE}[2]{\LP\key{WhileLoop}~#1~#2\RP}
-\newcommand{\MAKEVEC}[2]{\LP\key{make-vector}~#1~#2\RP}
 \newcommand{\CMAKEVEC}[2]{\LP\key{make-vector}~#1~#2\RP}
 \newcommand{\MAKEVEC}[2]{\LP\key{make-vector}~#1~#2\RP}
 \newcommand{\CSETBANG}[2]{\LP\key{set!}~#1~#2\RP}