[pypy-commit] pypy jit-refactor-tests: kill check_loops
hakanardo
noreply at buildbot.pypy.org
Sat Nov 26 12:57:12 CET 2011
Author: Hakan Ardo <hakan at debian.org>
Branch: jit-refactor-tests
Changeset: r49812:3583510b011c
Date: 2011-11-26 12:55 +0100
http://bitbucket.org/pypy/pypy/changeset/3583510b011c/
Log: kill check_loops
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
@@ -1013,36 +1013,6 @@
"found %d %r, expected %d" % (found, insn, expected_count))
return insns
- def check_loops(self, expected=None, everywhere=False, **check):
- insns = {}
- for loop in self.loops:
- #if not everywhere:
- # if getattr(loop, '_ignore_during_counting', False):
- # continue
- insns = loop.summary(adding_insns=insns)
- if expected is not None:
- insns.pop('debug_merge_point', None)
- print
- print
- print " self.check_resops(%s)" % str(insns)
- print
- import pdb; pdb.set_trace()
- else:
- chk = ['%s=%d' % (i, insns.get(i, 0)) for i in check]
- print
- print
- print " self.check_resops(%s)" % ', '.join(chk)
- print
- import pdb; pdb.set_trace()
- return
-
- for insn, expected_count in check.items():
- getattr(rop, insn.upper()) # fails if 'rop.INSN' does not exist
- found = insns.get(insn, 0)
- assert found == expected_count, (
- "found %d %r, expected %d" % (found, insn, expected_count))
- return insns
-
def check_consistency(self):
"NOT_RPYTHON"
for loop in self.loops:
diff --git a/pypy/jit/metainterp/test/support.py b/pypy/jit/metainterp/test/support.py
--- a/pypy/jit/metainterp/test/support.py
+++ b/pypy/jit/metainterp/test/support.py
@@ -158,10 +158,6 @@
def check_resops(self, expected=None, **check):
get_stats().check_resops(expected=expected, **check)
-
- def check_loops(self, expected=None, everywhere=False, **check):
- get_stats().check_loops(expected=expected, everywhere=everywhere,
- **check)
def check_loop_count(self, count):
"""NB. This is a hack; use check_tree_loop_count() or
check_enter_count() for the real thing.
More information about the pypy-commit
mailing list