cfbolz at codespeak.net cfbolz at codespeak.net
Tue Sep 28 14:39:12 CEST 2010

Author: cfbolz
Date: Tue Sep 28 14:39:11 2010
New Revision: 77439

Modified:
Log:
fix an XXX

==============================================================================
+++ pypy/extradoc/talk/pepm2011/paper.tex	Tue Sep 28 14:39:11 2010
@@ -517,8 +517,8 @@
object, that shape summary is thus updated and the operation can be removed.
When the optimizer encounters a \texttt{getfield} from a virtual, the result is read
from the virtual object, and the operation is also removed.
-
-XXX what happens on a guard\_class?
+Equivalently, a \texttt{guard\_class} on a virtual object can be removed as
+well, because the virtual object has a fixed and known class.

In the example from last section, the following operations would produce two
virtual objects, and be completely removed from the optimized trace:
@@ -565,10 +565,11 @@
The rest of the trace is optimized similarly.

So far we have only described what happens when virtual objects are used in
-operations that read and write their fields. When the virtual object is used in
+operations that read and write their fields and in guards. When the virtual
+object is used in
any other operation, it cannot stay virtual. For example, when a virtual object
is stored in a globally accessible place, the object needs to actually be
-allocated, as it will live longer than one iteration of the loop.
+allocated, as it might live longer than one iteration of the loop.

This is what happens at the end of the trace in Figure~\ref{fig:unopt-trace}, when the \texttt{jump} operation
is hit. The arguments of the jump are at this point virtual objects. Before the
@@ -577,7 +578,6 @@
values that the virtual object has. This means that instead of the jump, the
following operations are emitted:

-
\texttt{
\begin{tabular}{l}
$p_{15}$ = new(BoxedInteger) \\