소스 검색

Merge branch 'master' of https://github.com/Compiler-Construction-Uni-Freiburg/Essentials-of-Compilation

Peter Thiemann 3 년 전
부모
커밋
4cceedacbe
2개의 변경된 파일12개의 추가작업 그리고 12개의 파일을 삭제
  1. 11 11
      book.tex
  2. 1 1
      defs.tex

+ 11 - 11
book.tex

@@ -10502,10 +10502,10 @@ generate better code by taking this fact into account.
 
 The output language of \code{explicate\_control} is \LangCLoop{}
 (Figure~\ref{fig:c7-syntax}), which is nearly identical to
-\LangCIf{}. The only syntactic difference is that
-\code{read} may also appear as a statement.  The most significant
-difference between programs in \LangCIf{} and programs in \LangCLoop{},
-generated by the passes of the compiler,
+\LangCIf{}. The only syntactic difference is that \code{read} may also
+appear as a statement.  The most significant difference between the
+programs generated by \code{explicate\_control} in
+Chapter~\ref{ch:Lif} versus \code{explicate\_control} in this chapter
 is that the control-flow graphs of the later may contain cycles.
 
 \begin{figure}[tp]
@@ -11476,10 +11476,6 @@ succeed.
 %%   and ToSpace.
 %% \end{exercise}
 
-
-%% \section{Compiler Passes}
-%% \label{sec:code-generation-gc}
-
 The introduction of garbage collection has a non-trivial impact on our
 compiler passes. We introduce a new compiler pass named
 \code{expose\_allocation}. We make significant changes to
@@ -14246,10 +14242,12 @@ include all the caller-saved registers. Recall that the reason for
 that is to force variables that are live across a function call to be assigned to callee-saved
 registers or to be spilled to the stack.
 
-Regarding the set of read locations $R$ the arity field of
+Regarding the set of read locations $R$, the arity field of
 \code{TailJmp} and \code{IndirectCallq} determines how many of the
 argument-passing registers should be considered as read by those
-instructions.
+instructions. Also, the target field of \code{TailJmp} and
+\code{IndirectCallq} should be included in the set of read locations
+$R$.
 
 \subsection{Build Interference Graph}
 \label{sec:build-interference-r4}
@@ -15580,6 +15578,8 @@ def g(x_0 : int)-> int:
 \label{sec:closure-conversion}
 \index{subject}{closure conversion}
 
+[TODO: discuss conversion of \code{AnnAssign} to \code{Assign} -Jeremy]
+
 The compiling of lexically-scoped functions into top-level function
 definitions is accomplished in the pass \code{convert\_to\_closures}
 that comes after \code{reveal\_functions} and before
@@ -15728,7 +15728,7 @@ application, we turn function references into closures.
 \fi}
 {\if\edition\pythonEd
 \begin{lstlisting}
-FunRefArity(|$f$|, |$n$|)
+FunRef(|$f$|)
 \end{lstlisting}
 \fi}
 \end{minipage}

+ 1 - 1
defs.tex

@@ -233,7 +233,7 @@
 \newcommand{\CNOT}[1]{\LP\key{not}~#1\RP}
 \newcommand{\CALL}[2]{\key{Call}\LP #1\code{, } #2 \RP}
 \newcommand{\APPLY}[2]{\key{(Apply}~#1~#2\code{)}}
-\newcommand{\CAPPLY}[2]{\LP~#1~#2\RP}
+\newcommand{\CAPPLY}[2]{\LP#1~#2\RP}
 \newcommand{\FUNREF}[1]{\LP\key{FunRef}~#1\RP}
 \newcommand{\CFUNREF}[1]{\key{(fun-ref}~#1\code{)}}
 \fi