|
@@ -9008,13 +9008,13 @@ same way as the \ALLOC{\itm{len}}{\itm{type}} form
|
|
(Section~\ref{sec:select-instructions-gc}). The only difference is
|
|
(Section~\ref{sec:select-instructions-gc}). The only difference is
|
|
that you should place the \itm{arity} in the tag that is stored at
|
|
that you should place the \itm{arity} in the tag that is stored at
|
|
position $0$ of the vector. Recall that in
|
|
position $0$ of the vector. Recall that in
|
|
-Section~\ref{sec:select-instructions-gc} we used the first $56$ bits
|
|
|
|
-of the 64-bit tag, but that the rest were unused. So the arity goes
|
|
|
|
-into the tag in bit positions $57$ through $63$.
|
|
|
|
|
|
+Section~\ref{sec:select-instructions-gc} a portion of the 64-bit tag
|
|
|
|
+was not used. We store the arity in the $5$ bits starting at position
|
|
|
|
+$58$.
|
|
|
|
|
|
Compile the \code{procedure-arity} operator into a sequence of
|
|
Compile the \code{procedure-arity} operator into a sequence of
|
|
instructions that access the tag from position $0$ of the vector and
|
|
instructions that access the tag from position $0$ of the vector and
|
|
-shift it by $57$ bits to the right.
|
|
|
|
|
|
+extract the $5$-bits starting at position $58$ from the tag.
|
|
|
|
|
|
\begin{figure}[p]
|
|
\begin{figure}[p]
|
|
\begin{tikzpicture}[baseline=(current bounding box.center)]
|
|
\begin{tikzpicture}[baseline=(current bounding box.center)]
|
|
@@ -12173,8 +12173,8 @@ lowering the primitive operations into x86 instructions. So we need
|
|
to translate the new \code{PVector} operations to x86. To do so, the
|
|
to translate the new \code{PVector} operations to x86. To do so, the
|
|
first question we need to answer is how will we differentiate the two
|
|
first question we need to answer is how will we differentiate the two
|
|
kinds of values (vectors and proxies) that can inhabit \code{PVector}.
|
|
kinds of values (vectors and proxies) that can inhabit \code{PVector}.
|
|
-We need just one bit to accomplish this, so we use the $57$th bit of
|
|
|
|
-the 64-bit tag at the front of every vector (see
|
|
|
|
|
|
+We need just one bit to accomplish this, and use the bit in position
|
|
|
|
+$57$ of the 64-bit tag at the front of every vector (see
|
|
Figure~\ref{fig:tuple-rep}). So far, this bit has been set to $0$, so
|
|
Figure~\ref{fig:tuple-rep}). So far, this bit has been set to $0$, so
|
|
for \code{inject-vector} we leave it that way.
|
|
for \code{inject-vector} we leave it that way.
|
|
\begin{lstlisting}
|
|
\begin{lstlisting}
|
|
@@ -12182,7 +12182,7 @@ for \code{inject-vector} we leave it that way.
|
|
|$\Rightarrow$|
|
|
|$\Rightarrow$|
|
|
movq |$e'_1$|, |$\itm{lhs'}$|
|
|
movq |$e'_1$|, |$\itm{lhs'}$|
|
|
\end{lstlisting}
|
|
\end{lstlisting}
|
|
-On the other hand, \code{inject-proxy} sets the $57$th bit to $1$.
|
|
|
|
|
|
+On the other hand, \code{inject-proxy} sets bit $57$ to $1$.
|
|
\begin{lstlisting}
|
|
\begin{lstlisting}
|
|
(Assign |$\itm{lhs}$| (Prim 'inject-proxy (list |$e_1$|)))
|
|
(Assign |$\itm{lhs}$| (Prim 'inject-proxy (list |$e_1$|)))
|
|
|$\Rightarrow$|
|
|
|$\Rightarrow$|
|