Author: Maciej Fijalkowski <[email protected]>
Branch: optresult-unroll
Changeset: r79245:cc1ab08f4f5f
Date: 2015-08-27 10:34 +0200
http://bitbucket.org/pypy/pypy/changeset/cc1ab08f4f5f/
Log: some fixes to test_dict
diff --git a/rpython/jit/metainterp/optimizeopt/virtualstate.py
b/rpython/jit/metainterp/optimizeopt/virtualstate.py
--- a/rpython/jit/metainterp/optimizeopt/virtualstate.py
+++ b/rpython/jit/metainterp/optimizeopt/virtualstate.py
@@ -641,6 +641,6 @@
# to be non-None, so clearing is not important any more
return VArrayStateInfo(arraydescr)
- def visit_varraystruct(self, arraydescr, fielddescrs):
+ def visit_varraystruct(self, arraydescr, length, fielddescrs):
return VArrayStructStateInfo(arraydescr, fielddescrs)
diff --git a/rpython/jit/metainterp/test/test_dict.py
b/rpython/jit/metainterp/test/test_dict.py
--- a/rpython/jit/metainterp/test/test_dict.py
+++ b/rpython/jit/metainterp/test/test_dict.py
@@ -230,7 +230,7 @@
self.meta_interp(f, [10])
# XXX should be one getinteriorfield_gc. At least it's one call.
- self.check_simple_loop(call=1, getinteriorfield_gc=2,
+ self.check_simple_loop(call_i=1, getinteriorfield_gc_i=2,
guard_no_exception=1)
def test_ordered_dict_two_lookups(self):
@@ -251,7 +251,7 @@
self.meta_interp(f, [10])
# XXX should be one getinteriorfield_gc. At least it's one call.
- self.check_simple_loop(call=1, getinteriorfield_gc=2,
+ self.check_simple_loop(call_i=1, getinteriorfield_gc_i=2,
guard_no_exception=1)
def test_dict_insert_invalidates_caches(self):
@@ -272,7 +272,7 @@
res = self.meta_interp(f, [10])
assert res == f(10)
- self.check_simple_loop(call=5)
+ self.check_simple_loop(call_i=4, call_n=1)
def test_dict_array_write_invalidates_caches(self):
driver = JitDriver(greens = [], reds = 'auto')
@@ -294,7 +294,7 @@
exp = f(10)
res = self.meta_interp(f, [10])
assert res == exp
- self.check_simple_loop(call=7)
+ self.check_simple_loop(call_i=5, call_n=2)
def test_dict_double_lookup_2(self):
driver = JitDriver(greens = [], reds = 'auto')
@@ -313,7 +313,7 @@
res = self.meta_interp(f, [10])
assert res == f(10)
- self.check_simple_loop(call=3)
+ self.check_simple_loop(call_i=2, call_n=1)
def test_dict_eq_can_release_gil(self):
from rpython.rtyper.lltypesystem import lltype, rffi
@@ -345,8 +345,9 @@
res = self.meta_interp(f, [10], listops=True)
assert res == 2 + 1 + 1 + 1
- self.check_simple_loop(call_may_force=4, # ll_dict_lookup_trampoline
- call=1) # ll_dict_setitem_lookup_done_trampoline
+ self.check_simple_loop(call_may_force_i=4,
+ # ll_dict_lookup_trampoline
+ call_n=1) #
ll_dict_setitem_lookup_done_trampoline
def test_bug42(self):
myjitdriver = JitDriver(greens = [], reds = 'auto')
@@ -361,7 +362,7 @@
if n in mdict:
raise Exception
self.meta_interp(f, [10])
- self.check_simple_loop(call_may_force=0, call=4)
+ self.check_simple_loop(call_may_force_i=0, call_i=3, call_n=1)
def test_dict_virtual(self):
myjitdriver = JitDriver(greens = [], reds = 'auto')
@@ -376,7 +377,7 @@
n -= 1
return len(d)
self.meta_interp(f, [100])
- self.check_simple_loop(call_may_force=0, call=0, new=0)
+ self.check_simple_loop(call_may_force_i=0, call_i=0, new=0)
class TestLLtype(DictTests, LLJitMixin):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit