Author: Maciej Fijalkowski <[email protected]>
Branch: cleanup-llgraph-backend
Changeset: r58194:4c23aeda02ca
Date: 2012-10-18 10:34 +0200
http://bitbucket.org/pypy/pypy/changeset/4c23aeda02ca/

Log:    WeakKeyDictionary does not seem to work

diff --git a/pypy/jit/backend/llgraph/runner.py 
b/pypy/jit/backend/llgraph/runner.py
--- a/pypy/jit/backend/llgraph/runner.py
+++ b/pypy/jit/backend/llgraph/runner.py
@@ -1,5 +1,3 @@
-
-from weakref import WeakKeyDictionary
 
 from pypy.jit.backend import model
 from pypy.jit.backend.llgraph import support
@@ -151,7 +149,6 @@
         model.AbstractCPU.__init__(self)
         self.rtyper = rtyper
         self.llinterp = LLInterpreter(rtyper)
-        self.known_labels = WeakKeyDictionary()
         self.last_exception = None
         self.descrs = {}
         class MiniStats:
@@ -183,7 +180,7 @@
                               for op in lltrace.operations]
         for i, op in enumerate(lltrace.operations):
             if op.getopnum() == rop.LABEL:
-                self.known_labels[op.getdescr()] = (lltrace, i)
+                op.getdescr()._llgraph_target = (lltrace, i)
 
     def invalidate_loop(self, looptoken):
         for trace in looptoken.compiled_loop_token._llgraph_alltraces:
@@ -551,7 +548,7 @@
                 resval = getattr(self, 'execute_' + 
op.getopname())(op.getdescr(),
                                                                     *args)
             except Jump, j:
-                self.lltrace, i = self.cpu.known_labels[j.descr]
+                self.lltrace, i = j.descr._llgraph_target
                 label_op = self.lltrace.operations[i]
                 self.do_renaming(label_op.getarglist(), j.args)
                 i += 1
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to