[pypy-svn] r78169 - pypy/extradoc/talk/pepm2011
cfbolz at codespeak.net
cfbolz at codespeak.net
Thu Oct 21 14:02:27 CEST 2010
Author: cfbolz
Date: Thu Oct 21 14:02:26 2010
New Revision: 78169
Modified:
pypy/extradoc/talk/pepm2011/escape-tracing.pdf
pypy/extradoc/talk/pepm2011/paper.tex
Log:
add line numbers
Modified: pypy/extradoc/talk/pepm2011/escape-tracing.pdf
==============================================================================
Binary files. No diff available.
Modified: pypy/extradoc/talk/pepm2011/paper.tex
==============================================================================
--- pypy/extradoc/talk/pepm2011/paper.tex (original)
+++ pypy/extradoc/talk/pepm2011/paper.tex Thu Oct 21 14:02:26 2010
@@ -30,7 +30,7 @@
showstringspaces=false,
%keywords={def,while,if,elif,return,class,get,set,new,guard_class}
numberstyle = \tiny,
- numbersep = 0pt,
+ numbersep = -20pt,
}
@@ -591,10 +591,10 @@
The following operations (lines 10-17) are more interesting:
% XXX line numbers
-\begin{lstlisting}[mathescape,xleftmargin=20pt]
-$p_{5}$ = new(BoxedInteger)
-set($p_{5}$, intval, $i_{4}$)
-$p_{6}$ = new(BoxedInteger)
+\begin{lstlisting}[mathescape,xleftmargin=20pt,numbers=right,escapechar=|, firstnumber=10]
+$p_{5}$ = new(BoxedInteger) |\setcounter{lstnumber}{11}|
+set($p_{5}$, intval, $i_{4}$) |\setcounter{lstnumber}{14}|
+$p_{6}$ = new(BoxedInteger) |\setcounter{lstnumber}{16}|
set($p_{6}$, intval, -100)
\end{lstlisting}
@@ -622,12 +622,10 @@
The subsequent operations (line 19-29) in Figure~\ref{fig:unopt-trace}, which
use $p_{5}$ and $p_{6}$, can then be optimized using that knowledge:
-\begin{lstlisting}[mathescape,xleftmargin=20pt]
-guard_class($p_{5}$, BoxedInteger)
-# inside BoxedInteger.add
+\begin{lstlisting}[mathescape,xleftmargin=20pt,numbers=right,escapechar=|, firstnumber=20]
+guard_class($p_{5}$, BoxedInteger) |\setcounter{lstnumber}{21}|
$i_{7}$ = get($p_{5}$, intval)
-guard_class($p_{6}$, BoxedInteger)
-# inside BoxedInteger.add__int
+guard_class($p_{6}$, BoxedInteger) |\setcounter{lstnumber}{24}|
$i_{8}$ = get($p_{6}$, intval)
$i_{9}$ = int_add($i_{7}$, $i_{8}$)
\end{lstlisting}
@@ -640,7 +638,7 @@
replaced by $i_{4}$ and -100. The only operation put into the optimized trace
is the addition:
-\begin{lstlisting}[mathescape,xleftmargin=20pt]
+\begin{lstlisting}[mathescape,xleftmargin=20pt,numbers=right,escapechar=|, firstnumber=26]
$i_{9}$ = int_add($i_{4}$, -100)
\end{lstlisting}
@@ -667,11 +665,11 @@
because the static objects could form an arbitrary graph structure. In our
example is is simple, though:
-\begin{lstlisting}[mathescape,xleftmargin=20pt]
-$p_{15}$ = new(BoxedInteger)
-set($p_{15}$, intval, $i_{14}$)
-$p_{10}$ = new(BoxedInteger)
-set($p_{10}$, intval, $i_{9}$)
+\begin{lstlisting}[mathescape,xleftmargin=20pt,numbers=right,escapechar=|, firstnumber=44]
+$p_{15}$ = new(BoxedInteger) |\setcounter{lstnumber}{45}|
+set($p_{15}$, intval, $i_{14}$) |\setcounter{lstnumber}{26}|
+$p_{10}$ = new(BoxedInteger) |\setcounter{lstnumber}{28}|
+set($p_{10}$, intval, $i_9$) |\setcounter{lstnumber}{54}|
jump($p_{15}$, $p_{10}$)
\end{lstlisting}
@@ -692,7 +690,7 @@
and only three \lstinline{guard_class} operations, from the original seven.
\begin{figure}
-\begin{lstlisting}[mathescape,numbers=right,escapechar=|,numberstyle = \tiny,numbersep=0pt, numberblanklines=false]
+\begin{lstlisting}[mathescape,numbers=right,escapechar=|, numberblanklines=false]
# arguments to the trace: $p_{0}$, $p_{1}$ |\setcounter{lstnumber}{2}|
guard_class($p_1$, BoxedInteger) |\setcounter{lstnumber}{4}|
$i_2$ = get($p_1$, intval)
More information about the Pypy-commit
mailing list