Skip to content

Commit a7ebbd8

Browse files
committed
add explanation of the conclusion block
1 parent 70e45b3 commit a7ebbd8

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

book.tex

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
\def\racketEd{0}
2828
\def\pythonEd{1}
29-
\def\edition{1}
29+
\def\edition{0}
3030

3131
% material that is specific to the Racket edition of the book
3232
\newcommand{\racket}[1]{{\if\edition\racketEd{#1}\fi}}
@@ -3866,12 +3866,17 @@ \section{Select Instructions}
38663866
\fi}
38673867

38683868
{\if\edition\racketEd
3869+
%
38693870
There are two cases for the $\Tail$ nonterminal: \key{Return} and
38703871
\key{Seq}. Regarding \key{Return}, we recommend treating it as an
3871-
assignment to the \key{rax} register followed by a jump to the
3872-
conclusion of the program (so the conclusion needs to be labeled).
3872+
assignment to the \key{rax} register followed by a jump to
3873+
the label \key{conclusion}. Later, in Section~\ref{sec:print-x86},
3874+
we discuss the generation of the \key{conclusion} block.
3875+
In the meantime, the interpreter for \LangXVar{} recognizes a jump
3876+
to \key{conclusion} as the end of the program.
38733877
For $\SEQ{s}{t}$, you can translate the statement $s$ and tail $t$
38743878
recursively and then append the resulting instructions.
3879+
%
38753880
\fi}
38763881

38773882
{\if\edition\pythonEd\pythonColor

0 commit comments

Comments
 (0)