|
@@ -26,7 +26,7 @@
|
|
|
|
|
|
\def\racketEd{0}
|
|
|
\def\pythonEd{1}
|
|
|
-\def\edition{1}
|
|
|
+\def\edition{0}
|
|
|
|
|
|
% material that is specific to the Racket edition of the book
|
|
|
\newcommand{\racket}[1]{{\if\edition\racketEd{#1}\fi}}
|
|
@@ -8639,7 +8639,7 @@ $\Atm$ to x86:
|
|
|
\MID \BININSTR{\code{cmpq}}{\Arg}{\Arg}\\
|
|
|
&\MID& \BININSTR{\code{set}}{\itm{cc}}{\Arg}
|
|
|
\MID \BININSTR{\code{movzbq}}{\Arg}{\Arg}\\
|
|
|
- &\MID& \JMPIF{'\itm{cc}'}{\itm{label}}
|
|
|
+ &\MID& \JMPIF{\itm{cc}}{\itm{label}}
|
|
|
\end{array}
|
|
|
}
|
|
|
|
|
@@ -8675,7 +8675,7 @@ $\Atm$ to x86:
|
|
|
&\MID& \gray{ \POPQ{\Arg} \MID \racket{\JMP{\itm{label}}} } \python{\JMP{\itm{label}}}\\
|
|
|
&\MID& \BININSTR{\scode{xorq}}{\Arg}{\Arg}
|
|
|
\MID \BININSTR{\scode{cmpq}}{\Arg}{\Arg}\\
|
|
|
- &\MID& \BININSTR{\scode{set}}{\itm{cc}}{\Arg}
|
|
|
+ &\MID& \UNIINSTR{\scode{set}\code{+}\itm{cc}}{\Arg}
|
|
|
\MID \BININSTR{\scode{movzbq}}{\Arg}{\Arg}\\
|
|
|
&\MID& \JMPIF{\itm{cc}}{\itm{label}} \\
|
|
|
\Block &::= & \Instr^{+} \\
|
|
@@ -11537,9 +11537,10 @@ program:\\
|
|
|
\begin{lstlisting}
|
|
|
(let ([x 2])
|
|
|
(let ([y 0])
|
|
|
- (+ y (let ([t1 (get! x)])
|
|
|
- (let ([t2 (begin (set! x 40) (get! x))])
|
|
|
- (+ t1 t2))))))
|
|
|
+ (let ([t1 x])
|
|
|
+ (let ([t2 (begin (set! x 40) x)])
|
|
|
+ (let ([t3 (+ t1 t2)])
|
|
|
+ (+ y t3))))))
|
|
|
\end{lstlisting}
|
|
|
\end{minipage}
|
|
|
The temporary variable \code{t1} gets the value of \code{x} before the
|
|
@@ -12893,7 +12894,6 @@ translation of tuple creation.
|
|
|
&\MID& \key{collect}(\itm{int})
|
|
|
\MID \key{allocate}(\itm{int},\itm{type})
|
|
|
\MID \key{global\_value}(\itm{name}) \\
|
|
|
- &\MID& \key{begin:} ~ \Stmt^{*} ~ \Exp \\
|
|
|
\Stmt &::= & \CASSIGN{\CPUT{\Exp}{\itm{int}}}{\Exp}
|
|
|
\end{array}
|
|
|
\]
|
|
@@ -12916,10 +12916,6 @@ where $\Type_i$ is the type of the $i$th element.
|
|
|
%
|
|
|
The \CGLOBALVALUE{\itm{name}} form reads the value of a global
|
|
|
variable, such as \code{free\_ptr}.
|
|
|
-%
|
|
|
-\python{The \code{begin} form is an expression that executes a
|
|
|
- sequence of statements and then produces the value of the expression
|
|
|
- at the end.}
|
|
|
|
|
|
\racket{
|
|
|
The type information that you need for \CALLOCATE{$n$}{$\itm{type}$}
|