[pypy-commit] pypy jit-continue_tracing: for tests we need to keep the operations even when they are cleared from the history

hakanardo noreply at buildbot.pypy.org
Sat May 21 08:58:50 CEST 2011


Author: Hakan Ardo <hakan at debian.org>
Branch: jit-continue_tracing
Changeset: r44344:cb0aefe112e7
Date: 2011-05-21 09:08 +0200
http://bitbucket.org/pypy/pypy/changeset/cb0aefe112e7/

Log:	for tests we need to keep the operations even when they are cleared
	from the history

diff --git a/pypy/jit/metainterp/history.py b/pypy/jit/metainterp/history.py
--- a/pypy/jit/metainterp/history.py
+++ b/pypy/jit/metainterp/history.py
@@ -960,7 +960,7 @@
     compiled_count = 0
     enter_count = 0
     aborted_count = 0
-    history = None
+    operations = None
 
     def __init__(self):
         self.loops = []
@@ -968,7 +968,7 @@
         self.aborted_keys = []
 
     def set_history(self, history):
-        self.history = history
+        self.operations = history.operations
 
     def aborted(self):
         self.aborted_count += 1
@@ -998,7 +998,7 @@
 
     def check_history(self, expected=None, **check):
         insns = {}
-        for op in self.history.operations:
+        for op in self.operations:
             opname = op.getopname()
             insns[opname] = insns.get(opname, 0) + 1
         if expected is not None:


More information about the pypy-commit mailing list