[pypy-svn] pypy out-of-line-guards: Fix the test by invalidating all bridges and loops. This is the simplest
fijal
commits-noreply at bitbucket.org
Thu Dec 23 09:37:56 CET 2010
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: out-of-line-guards
Changeset: r40193:59a41f339877
Date: 2010-12-23 10:37 +0200
http://bitbucket.org/pypy/pypy/changeset/59a41f339877/
Log: Fix the test by invalidating all bridges and loops. This is the
simplest thing to do IMO. Slightly contrived in llgraph backend,
would be simpler in x86 backend
diff --git a/pypy/jit/metainterp/test/test_outofline.py b/pypy/jit/metainterp/test/test_outofline.py
--- a/pypy/jit/metainterp/test/test_outofline.py
+++ b/pypy/jit/metainterp/test/test_outofline.py
@@ -1,4 +1,5 @@
+import py
from pypy.rlib.jit import JitDriver, dont_look_inside, hint
from pypy.jit.metainterp.test.test_basic import LLJitMixin
@@ -142,5 +143,8 @@
assert self.meta_interp(f, []) == f()
+ def test_jit_invariant_invalidate_call_asm(self):
+ py.test.skip("WRITEME")
+
class TestLLtype(OutOfLineTests, LLJitMixin):
pass
diff --git a/pypy/jit/backend/llgraph/llimpl.py b/pypy/jit/backend/llgraph/llimpl.py
--- a/pypy/jit/backend/llgraph/llimpl.py
+++ b/pypy/jit/backend/llgraph/llimpl.py
@@ -296,8 +296,13 @@
loop.has_been_freed = True
def mark_as_invalid(loop):
- loop = _from_opaque(loop)
+ _mark_as_invalid(_from_opaque(loop))
+
+def _mark_as_invalid(loop):
assert not loop.has_been_freed
+ for op in loop.operations:
+ if op.is_guard() and op.jump_target is not None:
+ _mark_as_invalid(op.jump_target)
loop.invalidated = True
def compile_start_int_var(loop):
More information about the Pypy-commit
mailing list