Author: Alex Gaynor <alex.gay...@gmail.com> Branch: inline-dict-ops Changeset: r48282:f566dee94e85 Date: 2011-10-20 15:04 -0400 http://bitbucket.org/pypy/pypy/changeset/f566dee94e85/
Log: fix tests for new inlining diff --git a/pypy/jit/metainterp/test/test_dict.py b/pypy/jit/metainterp/test/test_dict.py --- a/pypy/jit/metainterp/test/test_dict.py +++ b/pypy/jit/metainterp/test/test_dict.py @@ -91,7 +91,8 @@ res1 = f(100) res2 = self.meta_interp(f, [100], listops=True) assert res1 == res2 - self.check_loops(int_mod=3) # the hash was traced and eq + # the hash was traced + self.check_loops(int_mod=1) def test_dict_setdefault(self): myjitdriver = JitDriver(greens = [], reds = ['total', 'dct']) @@ -128,7 +129,7 @@ assert f(100) == 50 res = self.meta_interp(f, [100], listops=True) assert res == 50 - self.check_loops(int_mod=3) # key + eq + self.check_loops(int_mod=1) # key def test_repeated_lookup(self): myjitdriver = JitDriver(greens = [], reds = ['n', 'd']) @@ -153,10 +154,12 @@ res = self.meta_interp(f, [100], listops=True) assert res == f(50) - self.check_loops({"call": 7, "guard_false": 1, "guard_no_exception": 6, + self.check_loops({"call": 5, "getfield_gc": 1, "getinteriorfield_gc": 1, + "guard_false": 1, "guard_no_exception": 4, "guard_true": 1, "int_and": 1, "int_gt": 1, "int_is_true": 1, "int_sub": 1, "jump": 1, - "new_with_vtable": 1, "setfield_gc": 1}) + "new_with_vtable": 1, "new": 1, "new_array": 1, + "setfield_gc": 3, }) class TestOOtype(DictTests, OOJitMixin): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit