Author: Hakan Ardo <ha...@debian.org> Branch: jit-targets Changeset: r49364:ed426958d5e2 Date: 2011-11-12 13:59 +0100 http://bitbucket.org/pypy/pypy/changeset/ed426958d5e2/
Log: fix tests diff --git a/pypy/jit/metainterp/test/test_del.py b/pypy/jit/metainterp/test/test_del.py --- a/pypy/jit/metainterp/test/test_del.py +++ b/pypy/jit/metainterp/test/test_del.py @@ -25,7 +25,7 @@ 'int_sub': 2, 'int_gt': 2, 'guard_true': 2, - 'jump': 2}) + 'jump': 1}) def test_class_of_allocated(self): myjitdriver = JitDriver(greens = [], reds = ['n', 'x']) 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 @@ -154,7 +154,7 @@ res = self.meta_interp(f, [100], listops=True) assert res == f(50) self.check_resops({'new_array': 2, 'getfield_gc': 2, - 'guard_true': 2, 'jump': 2, + 'guard_true': 2, 'jump': 1, 'new_with_vtable': 2, 'getinteriorfield_gc': 2, 'setfield_gc': 6, 'int_gt': 2, 'int_sub': 2, 'call': 10, 'int_and': 2, diff --git a/pypy/jit/metainterp/test/test_exception.py b/pypy/jit/metainterp/test/test_exception.py --- a/pypy/jit/metainterp/test/test_exception.py +++ b/pypy/jit/metainterp/test/test_exception.py @@ -512,7 +512,7 @@ res = self.meta_interp(main, [41], repeat=7) assert res == -1 - self.check_tree_loop_count(2) # the loop and the entry path + self.check_target_token_count(2) # the loop and the entry path # we get: # ENTER - compile the new loop and the entry bridge # ENTER - compile the leaving path (raising MyError) diff --git a/pypy/jit/metainterp/test/test_fficall.py b/pypy/jit/metainterp/test/test_fficall.py --- a/pypy/jit/metainterp/test/test_fficall.py +++ b/pypy/jit/metainterp/test/test_fficall.py @@ -77,14 +77,14 @@ int_add=2, int_lt=2, guard_true=2, - jump=2) + jump=1) else: self.check_resops( call_release_gil=0, # no CALL_RELEASE_GIL int_add=2, int_lt=2, guard_true=2, - jump=2) + jump=1) return res def test_byval_result(self): diff --git a/pypy/jit/metainterp/test/test_greenfield.py b/pypy/jit/metainterp/test/test_greenfield.py --- a/pypy/jit/metainterp/test/test_greenfield.py +++ b/pypy/jit/metainterp/test/test_greenfield.py @@ -24,7 +24,7 @@ # res = self.meta_interp(g, [7]) assert res == -2 - self.check_loop_count(2) + self.check_trace_count(2) self.check_resops(guard_value=0) def test_green_field_2(self): @@ -49,7 +49,7 @@ # res = self.meta_interp(g, [7]) assert res == -22 - self.check_loop_count(6) + self.check_trace_count(6) self.check_resops(guard_value=0) diff --git a/pypy/jit/metainterp/test/test_jitdriver.py b/pypy/jit/metainterp/test/test_jitdriver.py --- a/pypy/jit/metainterp/test/test_jitdriver.py +++ b/pypy/jit/metainterp/test/test_jitdriver.py @@ -28,10 +28,10 @@ i += 1 self.meta_interp(loop, [1, 4]) - assert sorted(called.keys()) == [(4, 1, "entry bridge"), (4, 1, "loop")] + assert sorted(called.keys()) == [(4, 1, "loop")] self.meta_interp(loop, [2, 4]) - assert sorted(called.keys()) == [(4, 1, "entry bridge"), (4, 1, "loop"), - (4, 2, "entry bridge"), (4, 2, "loop")] + assert sorted(called.keys()) == [(4, 1, "loop"), + (4, 2, "loop")] def test_on_compile_bridge(self): called = {} @@ -55,8 +55,7 @@ i += 1 self.meta_interp(loop, [1, 10]) - assert sorted(called.keys()) == ['bridge', (10, 1, "entry bridge"), - (10, 1, "loop")] + assert sorted(called.keys()) == ['bridge', (10, 1, "loop")] class TestLLtypeSingle(JitDriverTests, LLJitMixin): @@ -92,8 +91,9 @@ # the following numbers are not really expectations of the test # itself, but just the numbers that we got after looking carefully # at the generated machine code - self.check_loop_count(5) - self.check_tree_loop_count(4) # 2 x loop, 2 x enter bridge + self.check_trace_count(5) + self.check_jitcell_token_count(2) # 2 x loop including enter bridge + self.check_target_token_count(4) # 2 x loop, 2 x enter bridge self.check_enter_count(5) def test_inline(self): @@ -125,7 +125,7 @@ # we expect no loop at all for 'loop1': it should always be inlined # we do however get several version of 'loop2', all of which contains # at least one int_add, while there are no int_add's in 'loop1' - self.check_tree_loop_count(5) + self.check_jitcell_token_count(1) for loop in get_stats().loops: assert loop.summary()['int_add'] >= 1 diff --git a/pypy/jit/metainterp/test/test_jitprof.py b/pypy/jit/metainterp/test/test_jitprof.py --- a/pypy/jit/metainterp/test/test_jitprof.py +++ b/pypy/jit/metainterp/test/test_jitprof.py @@ -55,8 +55,6 @@ TRACING, BACKEND, ~ BACKEND, - BACKEND, - ~ BACKEND, ~ TRACING, RUNNING, ~ RUNNING, @@ -64,8 +62,8 @@ ~ BLACKHOLE ] assert profiler.events == expected - assert profiler.times == [3, 2, 1, 1] - assert profiler.counters == [1, 2, 1, 1, 3, 3, 1, 13, 2, 0, 0, 0, 0, + assert profiler.times == [2, 1, 1, 1] + assert profiler.counters == [1, 1, 1, 1, 3, 3, 1, 15, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0] def test_simple_loop_with_call(self): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit