Author: Armin Rigo <[email protected]>
Branch:
Changeset: r73844:abea248cb09f
Date: 2014-10-08 19:21 +0200
http://bitbucket.org/pypy/pypy/changeset/abea248cb09f/
Log: Test that jit.not_in_trace functions are really seen during
blackholing too
diff --git a/rpython/jit/metainterp/test/test_ajit.py
b/rpython/jit/metainterp/test/test_ajit.py
--- a/rpython/jit/metainterp/test/test_ajit.py
+++ b/rpython/jit/metainterp/test/test_ajit.py
@@ -4090,3 +4090,24 @@
res = self.meta_interp(f, [10])
assert res == 42
self.check_aborted_count(3)
+
+ def test_not_in_trace_blackhole(self):
+ class X:
+ seen = 0
+ def g(x):
+ if we_are_jitted():
+ raise NotImplementedError
+ x.seen = 42
+ g.oopspec = 'jit.not_in_trace()'
+
+ jitdriver = JitDriver(greens=[], reds=['n'])
+ def f(n):
+ while n >= 0:
+ jitdriver.jit_merge_point(n=n)
+ n -= 1
+ x = X()
+ g(x)
+ return x.seen
+
+ res = self.meta_interp(f, [10])
+ assert res == 42
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit