|
@@ -4686,9 +4686,9 @@ The \code{explicate-tail} function needs an additional case for
|
|
\key{if}. The branches of the \key{if} inherit the current context, so
|
|
\key{if}. The branches of the \key{if} inherit the current context, so
|
|
they are in tail position. Let $B_1$ be the result of
|
|
they are in tail position. Let $B_1$ be the result of
|
|
\code{explicate-tail} on the ``then'' branch of the \key{if}, so $B_1$
|
|
\code{explicate-tail} on the ``then'' branch of the \key{if}, so $B_1$
|
|
-is a $\Tail$ AST node. Let $B_2$ be the result of apply
|
|
|
|
|
|
+is a $\Tail$ AST node. Let $B_2$ be the result of applying
|
|
\code{explicate-tail} to the ``else'' branch. Finally, let $B_3$ be
|
|
\code{explicate-tail} to the ``else'' branch. Finally, let $B_3$ be
|
|
-the $\Tail$ that results fromapplying \code{explicate-pred} to the
|
|
|
|
|
|
+the $\Tail$ that results from applying \code{explicate-pred} to the
|
|
predicate $\itm{cnd}$ and the blocks $B_1$ and $B_2$. Then the
|
|
predicate $\itm{cnd}$ and the blocks $B_1$ and $B_2$. Then the
|
|
\key{if} as a whole translates to block $B_3$.
|
|
\key{if} as a whole translates to block $B_3$.
|
|
\[
|
|
\[
|
|
@@ -4707,7 +4707,7 @@ variable $x$ and then the control continues to some block $B_1$. The
|
|
code that we generate for both the ``then'' and ``else'' branches
|
|
code that we generate for both the ``then'' and ``else'' branches
|
|
needs to continue to $B_1$, so to avoid duplicating $B_1$ we instead
|
|
needs to continue to $B_1$, so to avoid duplicating $B_1$ we instead
|
|
add it to the control flow graph with a fresh label $\ell_1$. The
|
|
add it to the control flow graph with a fresh label $\ell_1$. The
|
|
-branches of the \key{if} inherit the current context, so that are in
|
|
|
|
|
|
+branches of the \key{if} inherit the current context, so they are in
|
|
assignment positions. Let $B_2$ be the result of applying
|
|
assignment positions. Let $B_2$ be the result of applying
|
|
\code{explicate-assign} to the ``then'' branch, variable $x$, and the
|
|
\code{explicate-assign} to the ``then'' branch, variable $x$, and the
|
|
block \GOTO{$\ell_1$}. Let $B_3$ be the result of applying
|
|
block \GOTO{$\ell_1$}. Let $B_3$ be the result of applying
|
|
@@ -5927,7 +5927,7 @@ program accesses the element in the inner tuple tuple via two vector
|
|
references.
|
|
references.
|
|
% tests/s2_17.rkt
|
|
% tests/s2_17.rkt
|
|
\begin{lstlisting}
|
|
\begin{lstlisting}
|
|
-(vector-ref (vector-ref (vector (vector 42)) 0) 0))
|
|
|
|
|
|
+(vector-ref (vector-ref (vector (vector 42)) 0) 0)
|
|
\end{lstlisting}
|
|
\end{lstlisting}
|
|
|
|
|
|
\section{Shrink}
|
|
\section{Shrink}
|