[pypy-svn] r78614 - pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test
hakanardo at codespeak.net
hakanardo at codespeak.net
Sun Oct 31 15:14:11 CET 2010
Author: hakanardo
Date: Sun Oct 31 15:14:09 2010
New Revision: 78614
Modified:
pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send.py
pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send_simple.py
Log:
fixed test
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:14:09 2010
@@ -2,10 +2,11 @@
from pypy.rlib.jit import JitDriver, hint, purefunction
from pypy.jit.codewriter.policy import StopAtXPolicy
from pypy.jit.metainterp.test.test_basic import LLJitMixin, OOJitMixin
-
+from pypy.rlib.jit import OPTIMIZER_FULL, OPTIMIZER_SIMPLE
class SendTests:
-
+ optimizer=OPTIMIZER_FULL
+
def test_green_send(self):
myjitdriver = JitDriver(greens = ['i'], reds = ['counter'])
lst = ["123", "45"]
@@ -164,8 +165,12 @@
for j in range(69, 75):
res = self.meta_interp(f, [j], policy=policy)
assert res == 42
- self.check_enter_count(5)
- self.check_loop_count(5)
+ if self.optimizer == OPTIMIZER_SIMPLE:
+ self.check_enter_count(3)
+ self.check_loop_count(3)
+ else:
+ self.check_enter_count(5)
+ self.check_loop_count(5)
def test_oosend_guard_failure(self):
myjitdriver = JitDriver(greens = [], reds = ['x', 'y', 'w'])
Modified: pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send_simple.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send_simple.py (original)
+++ pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_send_simple.py Sun Oct 31 15:14:09 2010
@@ -6,8 +6,9 @@
from pypy.jit.metainterp.test.test_basic import LLJitMixin, OOJitMixin
class LoopDummyTest(test_send.SendTests):
+ optimizer=OPTIMIZER_SIMPLE
def meta_interp(self, func, args, **kwds):
- return ll_meta_interp(func, args, optimizer=OPTIMIZER_SIMPLE,
+ return ll_meta_interp(func, args, optimizer=self.optimizer,
CPUClass=self.CPUClass,
type_system=self.type_system,
**kwds)
More information about the Pypy-commit
mailing list