[pypy-svn] r79723 - in pypy/trunk/pypy/jit/backend: llgraph test
arigo at codespeak.net
arigo at codespeak.net
Wed Dec 1 18:36:45 CET 2010
Author: arigo
Date: Wed Dec 1 18:36:43 2010
New Revision: 79723
Modified:
pypy/trunk/pypy/jit/backend/llgraph/llimpl.py
pypy/trunk/pypy/jit/backend/test/runner_test.py
Log:
Add a test for DEBUG_MERGE_POINT and JIT_DEBUG.
Modified: pypy/trunk/pypy/jit/backend/llgraph/llimpl.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/llgraph/llimpl.py (original)
+++ pypy/trunk/pypy/jit/backend/llgraph/llimpl.py Wed Dec 1 18:36:43 2010
@@ -583,7 +583,12 @@
def op_debug_merge_point(self, _, value, recdepth):
from pypy.jit.metainterp.warmspot import get_stats
loc = ConstPtr(value)._get_str()
- get_stats().add_merge_point_location(loc)
+ try:
+ stats = get_stats()
+ except AttributeError:
+ pass
+ else:
+ stats.add_merge_point_location(loc)
def op_guard_true(self, _, value):
if not value:
Modified: pypy/trunk/pypy/jit/backend/test/runner_test.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/test/runner_test.py (original)
+++ pypy/trunk/pypy/jit/backend/test/runner_test.py Wed Dec 1 18:36:43 2010
@@ -1203,6 +1203,13 @@
yield nan_and_infinity, rop.FLOAT_GT, operator.gt, all_cases_binary
yield nan_and_infinity, rop.FLOAT_GE, operator.ge, all_cases_binary
+ def test_noops(self):
+ c_box = self.alloc_string("hi there").constbox()
+ c_nest = ConstInt(0)
+ self.execute_operation(rop.DEBUG_MERGE_POINT, [c_box, c_nest], 'void')
+ self.execute_operation(rop.JIT_DEBUG, [c_box, c_nest, c_nest,
+ c_nest, c_nest], 'void')
+
class LLtypeBackendTest(BaseBackendTest):
More information about the Pypy-commit
mailing list