[pypy-svn] r79980 - in pypy/branch/jit-unroll-loops: . pypy pypy/jit/metainterp pypy/jit/metainterp/optimizeopt pypy/jit/metainterp/test pypy/module/array/benchmark pypy/module/array/test pypy/rlib pypy/rlib/test

hakanardo at codespeak.net hakanardo at codespeak.net
Sat Dec 11 15:50:20 CET 2010


Author: hakanardo
Date: Sat Dec 11 15:50:18 2010
New Revision: 79980

Modified:
   pypy/branch/jit-unroll-loops/   (props changed)
   pypy/branch/jit-unroll-loops/pypy/   (props changed)
   pypy/branch/jit-unroll-loops/pypy/jit/metainterp/compile.py
   pypy/branch/jit-unroll-loops/pypy/jit/metainterp/graphpage.py
   pypy/branch/jit-unroll-loops/pypy/jit/metainterp/optimizeopt/optimizer.py   (props changed)
   pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send_nounroll.py   (props changed)
   pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/Makefile   (props changed)
   pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/intimg.c   (props changed)
   pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/intimgtst.c   (props changed)
   pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/intimgtst.py   (props changed)
   pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/loop.c   (props changed)
   pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/sum.c   (props changed)
   pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/sumtst.c   (props changed)
   pypy/branch/jit-unroll-loops/pypy/module/array/benchmark/sumtst.py   (props changed)
   pypy/branch/jit-unroll-loops/pypy/module/array/test/test_array_old.py   (props changed)
   pypy/branch/jit-unroll-loops/pypy/rlib/rerased.py   (props changed)
   pypy/branch/jit-unroll-loops/pypy/rlib/test/test_rerased.py   (props changed)
Log:
svn merge -r79977:HEAD svn+ssh://hakanardo@codespeak.net/svn/pypy/trunk

Modified: pypy/branch/jit-unroll-loops/pypy/jit/metainterp/compile.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/jit/metainterp/compile.py	(original)
+++ pypy/branch/jit-unroll-loops/pypy/jit/metainterp/compile.py	Sat Dec 11 15:50:18 2010
@@ -71,6 +71,8 @@
             op.setdescr(None)    # clear reference, mostly for tests
     # mostly for tests: make sure we don't keep a reference to the LoopToken
     loop.token = None
+    if not we_are_translated():
+        loop._number = looptoken.number
 
 # ____________________________________________________________
 

Modified: pypy/branch/jit-unroll-loops/pypy/jit/metainterp/graphpage.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/jit/metainterp/graphpage.py	(original)
+++ pypy/branch/jit-unroll-loops/pypy/jit/metainterp/graphpage.py	Sat Dec 11 15:50:18 2010
@@ -31,8 +31,10 @@
     def compute(self, graphs, errmsg=None):
         resopgen = ResOpGen()
         for graph, highlight in graphs:
-            if hasattr(graph, 'token'):
+            if getattr(graph, 'token', None) is not None:
                 resopgen.jumps_to_graphs[graph.token] = graph
+            if getattr(graph, '_number', None) is not None:
+                resopgen.jumps_to_graphs[graph._number] = graph
         
         for graph, highlight in graphs:
             resopgen.add_graph(graph, highlight)
@@ -173,7 +175,10 @@
             if tgt is None:
                 tgt_g = graphindex
             else:
-                tgt = self.jumps_to_graphs.get(tgt)
+                if tgt in self.jumps_to_graphs:
+                    tgt = self.jumps_to_graphs[tgt]
+                else:
+                    tgt = self.jumps_to_graphs.get(tgt.number)
                 if tgt is not None:
                     tgt_g = self.graphs.index(tgt)
             if tgt_g != -1:



More information about the Pypy-commit mailing list