Procházet zdrojové kódy

Disable peanut gallery for student version

Ryan Newton před 8 roky
rodič
revize
82e7dc1a30
1 změnil soubory, kde provedl 28 přidání a 18 odebrání
  1. 28 18
      book.tex

+ 28 - 18
book.tex

@@ -29,9 +29,16 @@
 % Computer Modern is already the default. -Jeremy
 %\renewcommand{\ttdefault}{cmtt}
 
+\if{0}
 % Peanut gallery comments:
 \definecolor{comment-red}{rgb}{0.8,0,0}
 \newcommand{\rn}[1]{{\color{comment-red}{(RRN: #1)}}}
+\newcommand{\margincomment}[1]{\marginpar{#1}}
+\else
+\newcommand{\rn}[1]{}
+\newcommand{\margincomment}[1]{}
+% \newcommand{\margincomment}[1]{}
+\fi
 
 \lstset{%
 language=Lisp,
@@ -88,7 +95,7 @@ moredelim=[is][\color{red}]{~}{~}
 \title{\Huge \textbf{Essentials of Compilation} \\ 
   \huge An Incremental Approach}
 
-\author{\textsc{Jeremy G. Siek} \\
+\author{\textsc{Jeremy G. Siek, Ryan R. Newton} \\
 %\thanks{\url{http://homes.soic.indiana.edu/jsiek/}} \\
   Indiana University \\
   \\
@@ -222,6 +229,7 @@ parts of x86-64 assembly language that are needed.
 %  \item Miscellaneous material (e.g. suggested readings etc).
 %\end{itemize}
 
+\if{0}
 \section*{Acknowledgments}
 
 Need to give thanks to 
@@ -242,6 +250,8 @@ Need to give thanks to
 \noindent \url{http://homes.soic.indiana.edu/jsiek} \\
 \noindent Spring 2016 
 
+\fi{} %% End Preface
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Preliminaries}
 \label{ch:trees-recur}
@@ -1036,7 +1046,7 @@ main:
 \label{fig:p0-x86}
 %\end{wrapfigure}
 \end{figure}
-%% \marginpar{Consider using italics for the texts in these figures.
+%% \margincomment{Consider using italics for the texts in these figures.
 %%   It can get confusing to differentiate them from the main text.}
 %% It looks pretty ugly in italics.-Jeremy
 
@@ -1332,7 +1342,7 @@ The topic of Chapter~\ref{ch:register-allocation} is implementing a
 smarter approach in which we make a best-effort to map variables to
 registers, resorting to the stack only when necessary.
 
-%% \marginpar{\scriptsize I'm confused: shouldn't `select instructions' do this?
+%% \margincomment{\scriptsize I'm confused: shouldn't `select instructions' do this?
 %% After all, that selects the x86 instructions. Even if it is separate,
 %% if we perform `patching' before register allocation, we aren't forced to rely on
 %% \key{rax} as much. This can ultimately make a more-performant result. --
@@ -1858,7 +1868,7 @@ passes described in this Chapter.  The x86$^{*}$ language extends x86
 with variables and looser rules regarding instruction arguments. The
 x86$^{\dagger}$ language is the concrete syntax (string) for x86.
 
-\marginpar{\footnotesize To do: add a challenge section. Perhaps
+\margincomment{\footnotesize To do: add a challenge section. Perhaps
   extending the partial evaluation to $R_0$? \\ --Jeremy}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1989,7 +1999,7 @@ Figure~\ref{fig:live-eg} shows the results of live variables analysis
 for the running example, with each instruction aligned with its
 $L_{\mathtt{after}}$ set to make the figure easy to read.
 
-\marginpar{JM: I think you should walk through the explanation of this formula,
+\margincomment{JM: I think you should walk through the explanation of this formula,
    connecting it back to the example from before. \\
    JS: Agreed.}
 
@@ -2098,7 +2108,7 @@ following.
   $\mathit{label}$), then add an edge $(r,v)$ for every caller-save
   register $r$ and every variable $v \in L_{\mathsf{after}}(k)$.
 \end{itemize}
-\marginpar{JM: I think you could give examples of each one of these
+\margincomment{JM: I think you could give examples of each one of these
   using the example program and use those to help explain why these
   rules are correct.\\
   JS: Agreed.}
@@ -2886,7 +2896,7 @@ opportunity for move biasing and visually inspect the output x86
 programs to make sure that your move biasing is working properly.
 \end{exercise}
 
-\marginpar{\footnotesize To do: another neat challenge would be to do
+\margincomment{\footnotesize To do: another neat challenge would be to do
   live range splitting~\citep{Cooper:1998ly}. \\ --Jeremy}
 
 
@@ -3749,7 +3759,7 @@ all. If the condition is a \code{let}, we can optimize based on the
 form of its body. If the condition is a \code{not}, then we can flip
 the two branches. 
 %
-\marginpar{\tiny We could do even better by converting to basic
+\margincomment{\tiny We could do even better by converting to basic
   blocks.\\ --Jeremy}
 %
 On the other hand, if the condition is a \code{and}
@@ -3845,11 +3855,11 @@ if_end21289:
 \chapter{Tuples and Garbage Collection}
 \label{ch:tuples}
 
-\marginpar{\scriptsize To do: look through Andre's code comments for extra
+\margincomment{\scriptsize To do: look through Andre's code comments for extra
   things to discuss in this chapter. \\ --Jeremy}
-\marginpar{\scriptsize To do: Flesh out this chapter, e.g., make sure
+\margincomment{\scriptsize To do: Flesh out this chapter, e.g., make sure
   all the IR grammars are spelled out! \\ --Jeremy}
-\marginpar{\scriptsize Introduce has-type, but after flatten, remove it,
+\margincomment{\scriptsize Introduce has-type, but after flatten, remove it,
   but keep type annotations on vector creation and local variables, function
   parameters, etc. \\ --Jeremy}
 
@@ -4119,7 +4129,7 @@ ToSpace.
 \label{fig:copying-collector}
 \end{figure}
 
-%% \marginpar{\tiny Need to add comment somewhere about the goodness
+%% \margincomment{\tiny Need to add comment somewhere about the goodness
 %%  of copying collection, especially that it doesn't touch
 %%  the garbage, so its time complexity only depends on the
 %%  amount of live data.\\ --Jeremy}
@@ -4284,7 +4294,7 @@ points to the first element of the root stack.
 As long as there is room left in the FromSpace, your generated code
 can allocate tuples simply by moving the \code{free\_ptr} forward.
 %
-\marginpar{\tiny Should we dedicate a register to the free pointer? \\
+\margincomment{\tiny Should we dedicate a register to the free pointer? \\
 --Jeremy}
 %
 The amount of room left in FromSpace is the difference between the
@@ -4777,7 +4787,7 @@ x86_2 &::= & (\key{program} \;(\itm{stackSpills} \; \itm{rootstackSpills}) \;(\k
 \label{sec:print-x86-gc}
 
 
-\marginpar{\scriptsize We need to show the translation to x86 and what
+\margincomment{\scriptsize We need to show the translation to x86 and what
   to do about global-value. \\ --Jeremy}
 
 Figure~\ref{fig:print-x86-output-gc} shows the output of the
@@ -4869,7 +4879,7 @@ if_end30967:
 \end{figure}
 
 
-\marginpar{\scriptsize Suggest an implementation strategy
+\margincomment{\scriptsize Suggest an implementation strategy
   in which the students first do the code gen and test that
   without GC (just use a big heap), then after that is debugged,
   implement the GC. \\ --Jeremy}
@@ -5035,10 +5045,10 @@ Figure~\ref{fig:interp-R4}.
 \section{Functions in x86}
 \label{sec:fun-x86}
 
-\marginpar{\tiny Make sure callee save registers are discussed
+\margincomment{\tiny Make sure callee save registers are discussed
    in enough depth, especially updating Fig 6.4 \\ --Jeremy }
 
-\marginpar{\tiny Talk about the return address on the
+\margincomment{\tiny Talk about the return address on the
    stack and what callq  and retq does.\\ --Jeremy }
 
 The x86 architecture provides a few features to support the
@@ -5141,7 +5151,7 @@ $8n-8$\key{(\%rsp)} & $8n+8$(\key{\%rbp})& argument $n$ \\
 
 \section{The compilation of functions}
 
-\marginpar{\scriptsize To do: discuss the need to push and
+\margincomment{\scriptsize To do: discuss the need to push and
   pop call-live pointers (vectors and functions) 
   to the root stack \\ --Jeremy}