[pypy-svn] r78620 - pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test
hakanardo at codespeak.net
hakanardo at codespeak.net
Sun Oct 31 15:52:39 CET 2010
Author: hakanardo
Date: Sun Oct 31 15:52:38 2010
New Revision: 78620
Modified:
pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send.py
pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send_nounroll.py
Log:
fixed tests
Modified: pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send.py (original)
+++ pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send.py Sun Oct 31 15:52:38 2010
@@ -165,7 +165,7 @@
for j in range(69, 75):
res = self.meta_interp(f, [j], policy=policy)
assert res == 42
- if self.optimizer == OPTIMIZER_SIMPLE:
+ if self.optimizer != OPTIMIZER_FULL:
self.check_enter_count(3)
self.check_loop_count(3)
else:
@@ -353,7 +353,7 @@
assert res == f(198)
# we get two TreeLoops: an initial one, and one entering from
# the interpreter
- if self.optimizer == OPTIMIZER_SIMPLE:
+ if self.optimizer != OPTIMIZER_FULL:
self.check_tree_loop_count(1)
else:
self.check_tree_loop_count(2)
@@ -409,7 +409,7 @@
# we expect 1 loop, 1 entry bridge, and 1 bridge going from the
# loop back to the start of the entry bridge
self.check_loop_count(2) # 1 loop + 1 bridge
- if self.optimizer == OPTIMIZER_SIMPLE:
+ if self.optimizer != OPTIMIZER_FULL:
self.check_tree_loop_count(1) # 1 loop
else:
self.check_tree_loop_count(2) # 1 loop + 1 entry bridge (argh)
@@ -433,7 +433,7 @@
return node.x
res = self.meta_interp(f, [55])
assert res == f(55)
- if self.optimizer == OPTIMIZER_SIMPLE:
+ if self.optimizer != OPTIMIZER_FULL:
self.check_tree_loop_count(1)
else:
self.check_tree_loop_count(2)
@@ -466,7 +466,7 @@
return n
res = self.meta_interp(f, [55], policy=StopAtXPolicy(extern))
assert res == f(55)
- if self.optimizer == OPTIMIZER_SIMPLE:
+ if self.optimizer != OPTIMIZER_FULL:
self.check_tree_loop_count(1)
else:
self.check_tree_loop_count(2)
Modified: pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send_nounroll.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send_nounroll.py (original)
+++ pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send_nounroll.py Sun Oct 31 15:52:38 2010
@@ -5,8 +5,10 @@
from pypy.jit.metainterp.test.test_basic import LLJitMixin, OOJitMixin
class LoopNoPSpecTest(test_send.SendTests):
+ optimizer=OPTIMIZER_NO_UNROLL
+
def meta_interp(self, func, args, **kwds):
- return ll_meta_interp(func, args, optimizer=OPTIMIZER_NO_UNROLL,
+ return ll_meta_interp(func, args, optimizer=self.optimizer,
CPUClass=self.CPUClass,
type_system=self.type_system,
**kwds)
@@ -22,9 +24,7 @@
class TestLLtype(LoopNoPSpecTest, LLJitMixin):
- def check_tree_loop_count(self, count):
- # we get one less entry bridge
- return LLJitMixin.check_tree_loop_count(self, count - 1)
+ pass
class TestOOtype(LoopNoPSpecTest, OOJitMixin):
pass
More information about the Pypy-commit
mailing list