cfbolz at codespeak.net cfbolz at codespeak.net
Fri Dec 19 17:05:51 CET 2008

Author: cfbolz
Date: Fri Dec 19 17:05:49 2008
New Revision: 60606

Modified:
Log:
make a figure

==============================================================================
+++ pypy/extradoc/talk/ecoop2009/jitgen.tex	Fri Dec 19 17:05:49 2008
@@ -75,7 +75,7 @@
unrolled by a partial evaluator.

When the function is partially evaluated with respect to the TLC example
-function shown in Figure XXX (which computes the absolute value of a number),
+function shown in Figure \ref{fig:tlc-abs} (which computes the absolute value of a number),
the residual code would look like in Figure \ref{fig:tlc-folded}. This version
is already a great improvement over pure interpretation, all the bytecode
dispatch overhead has been removed. However, the function as shown is still

==============================================================================
+++ pypy/extradoc/talk/ecoop2009/rainbow.tex	Fri Dec 19 17:05:49 2008
@@ -147,7 +147,7 @@
happen how. I will try to come up with something different}.

\begin{itemize}
-  XXX remove mention of rainbow interp. but this needs to be rewritten anyway
+  %XXX remove mention of rainbow interp. but this needs to be rewritten anyway
\item (compile time): the rainbow interpreter produces machine code until it
hits a promotion point; e.g.::

==============================================================================
+++ pypy/extradoc/talk/ecoop2009/tlc.tex	Fri Dec 19 17:05:49 2008
@@ -80,10 +80,12 @@
\subsection{TLC examples}

As we said above, TLC exists only at bytecode level; to ease the development
-of TLC programs, we wrote an assembler that generates TLC bytecode. The
-following example shows a simple program that computes the absolute value of
-the given integer:
+of TLC programs, we wrote an assembler that generates TLC bytecode. Figure \ref{fig:tlc-abs}
+shows a simple program that computes the absolute value of
+the given integer.

+\begin{figure}[h]
+\begin{center}
\begin{lstlisting}
main:             # stack: []
PUSHARG       #        [n]
@@ -101,6 +103,11 @@
SUB           #        [-n]
RETURN
\end{lstlisting}
+\caption{The TLC bytecode for computing the absolute value of a function}
+\label{fig:tlc-abs}
+\end{center}
+\end{figure}
+

Since reading TLC programs at bytecode level is hard, in this paper we will
use an invented Python-like syntax to describe examples, although we need to