Author: Maciej Fijalkowski <[email protected]>
Branch: optresult-unroll
Changeset: r79270:79beb329dbbe
Date: 2015-08-28 11:45 +0200
http://bitbucket.org/pypy/pypy/changeset/79beb329dbbe/
Log: fix some tests
diff --git a/rpython/jit/metainterp/history.py
b/rpython/jit/metainterp/history.py
--- a/rpython/jit/metainterp/history.py
+++ b/rpython/jit/metainterp/history.py
@@ -777,6 +777,9 @@
if 'call_assembler' in check:
assert check.pop('call_assembler') == 0
check['call_assembler_i'] = check['call_assembler_r'] =
check['call_assembler_f'] = check['call_assembler_n'] = 0
+ if 'getfield_gc' in check:
+ assert check.pop('getfield_gc') == 0
+ check['getfield_gc_i'] = check['getfield_gc_r'] =
check['getfield_gc_f'] = 0
for loop in self.get_all_loops():
insns = loop.summary(adding_insns=insns, omit_finish=omit_finish)
return self._check_insns(insns, expected, check)
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
@@ -80,7 +80,7 @@
return xy.inst_x
res = self.meta_interp(f, [20])
assert res == 30
- self.check_simple_loop(setfield_gc=0, getfield_gc=0)
+ self.check_simple_loop(setfield_gc=0, getfield_gc_i=0)
def test_preexisting_access_2(self):
myjitdriver = JitDriver(greens = [], reds = ['n', 'xy'],
@@ -105,8 +105,8 @@
assert f(5) == 185
res = self.meta_interp(f, [5])
assert res == 185
- self.check_resops(setfield_gc=0,
- getfield_gc=2) # <= at the header of the loop
+ self.check_resops(setfield_gc=0, getfield_gc_r=1,
+ getfield_gc_i=1) # <= at the header of the loop
def test_two_paths_access(self):
myjitdriver = JitDriver(greens = [], reds = ['n', 'xy'],
@@ -128,7 +128,7 @@
return xy.inst_x
res = self.meta_interp(f, [18])
assert res == 10118
- self.check_resops(setfield_gc=0, getfield_gc=2)
+ self.check_resops(setfield_gc=0, getfield_gc_i=1, getfield_gc_r=1)
def test_synchronize_in_return(self):
myjitdriver = JitDriver(greens = [], reds = ['n', 'xy'],
@@ -152,7 +152,7 @@
return xy.inst_x
res = self.meta_interp(f, [18])
assert res == 10180
- self.check_resops(setfield_gc=0, getfield_gc=2)
+ self.check_resops(setfield_gc=0, getfield_gc_i=1, getfield_gc_r=1)
def test_synchronize_in_return_2(self):
myjitdriver = JitDriver(greens = [], reds = ['n', 'xy'],
@@ -207,7 +207,7 @@
return res
res = self.meta_interp(f, [40])
assert res == 50 * 4
- self.check_resops(setfield_gc=0, getfield_gc=4)
+ self.check_resops(setfield_gc=0, getfield_gc_i=2, getfield_gc_r=2)
def test_double_frame(self):
myjitdriver = JitDriver(greens = [], reds = ['n', 'xy', 'other'],
@@ -230,8 +230,9 @@
return xy.inst_x
res = self.meta_interp(f, [20])
assert res == 134
- self.check_simple_loop(setfield_gc=1, getfield_gc=0, cond_call=1)
- self.check_resops(setfield_gc=2, getfield_gc=4)
+ self.check_simple_loop(setfield_gc=1, getfield_gc_i=0, cond_call=1,
+ getfield_gc_r=0)
+ self.check_resops(setfield_gc=2, getfield_gc_i=2, getfield_gc_r=2)
# ------------------------------
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit