Author: fijal
Branch: jit-leaner-frontend
Changeset: r82904:091da4a9fe3a
Date: 2016-03-09 14:15 +0200
http://bitbucket.org/pypy/pypy/changeset/091da4a9fe3a/
Log: fix check_history
diff --git a/rpython/jit/metainterp/history.py
b/rpython/jit/metainterp/history.py
--- a/rpython/jit/metainterp/history.py
+++ b/rpython/jit/metainterp/history.py
@@ -753,7 +753,6 @@
compiled_count = 0
enter_count = 0
aborted_count = 0
- operations = None
def __init__(self):
self.loops = []
@@ -780,9 +779,7 @@
self.jitcell_token_wrefs.append(weakref.ref(token))
def set_history(self, history):
- # XXX think about something
- pass
- #self.operations = history.operations
+ self.history = history
def aborted(self):
self.aborted_count += 1
@@ -819,7 +816,9 @@
def check_history(self, expected=None, **check):
insns = {}
- for op in self.operations:
+ t = self.history.trace.get_iter()
+ while not t.done():
+ op = t.next()
opname = op.getopname()
insns[opname] = insns.get(opname, 0) + 1
if expected is not None:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit