[pypy-commit] pypy default: the test that I think we should figure out how to pass
cfbolz
pypy.commits at gmail.com
Thu Mar 28 06:42:31 EDT 2019
Author: Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>
Branch:
Changeset: r96376:3929440c517f
Date: 2019-03-28 11:38 +0100
http://bitbucket.org/pypy/pypy/changeset/3929440c517f/
Log: the test that I think we should figure out how to pass
diff --git a/rpython/jit/metainterp/test/test_virtualizable.py b/rpython/jit/metainterp/test/test_virtualizable.py
--- a/rpython/jit/metainterp/test/test_virtualizable.py
+++ b/rpython/jit/metainterp/test/test_virtualizable.py
@@ -542,6 +542,41 @@
self.check_resops(getfield_gc_r=1, getarrayitem_gc_i=4,
getfield_gc_i=1)
+ @py.test.mark.xfail
+ def test_virtualizable_with_array_huge(self):
+ myjitdriver = JitDriver(greens = [], reds = ['n', 'x', 'frame'],
+ virtualizables = ['frame'])
+
+ class Frame(object):
+ _virtualizable_ = ['l[*]', 's']
+
+ def __init__(self, l, s):
+ self.l = l
+ self.s = s
+
+ def f(n, a):
+ frame = Frame([a] * 1024, 0) # make a huge frame
+ x = 0
+ while n > 0:
+ myjitdriver.can_enter_jit(frame=frame, n=n, x=x)
+ myjitdriver.jit_merge_point(frame=frame, n=n, x=x)
+ frame.s = promote(frame.s)
+ n -= 1
+ s = frame.s
+ assert s >= 0
+ x += frame.l[s]
+ frame.s += 1
+ s = frame.s
+ assert s >= 0
+ x += frame.l[s]
+ x += len(frame.l)
+ frame.s -= 1
+ return x
+
+ res = self.meta_interp(f, [50, 1], listops=True)
+ # should stop giving up to compile, eventually
+ assert get_stats().aborted_count < 6
+
def test_subclass_of_virtualizable(self):
myjitdriver = JitDriver(greens = [], reds = ['frame'],
virtualizables = ['frame'])
More information about the pypy-commit
mailing list