[pypy-svn] r79217 - pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test
hakanardo at codespeak.net
hakanardo at codespeak.net
Wed Nov 17 19:07:57 CET 2010
Author: hakanardo
Date: Wed Nov 17 19:07:56 2010
New Revision: 79217
Modified:
pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_basic.py
Log:
Better name
Modified: pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_basic.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_basic.py (original)
+++ pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_basic.py Wed Nov 17 19:07:56 2010
@@ -1809,17 +1809,17 @@
def __init__(self, val):
self.val = val
class A(Base):
- def add(self, other):
+ def binop(self, other):
return A(self.val + other.val)
class B(Base):
- def add(self, other):
+ def binop(self, other):
return B(self.val * other.val)
def f(x, y):
res = x
while y > 0:
myjitdriver.can_enter_jit(y=y, x=x, res=res)
myjitdriver.jit_merge_point(y=y, x=x, res=res)
- res = res.add(x)
+ res = res.binop(x)
y -= 1
return res
def g(x, y):
@@ -1834,8 +1834,8 @@
assert res == 6*8 + 6**8
self.check_loop_count(5)
self.check_loops({'guard_true': 2,
- 'int_add': 2, 'int_sub': 2, 'int_gt': 2,
- 'jump': 2})
+ 'int_add': 1, 'int_mul': 1, 'int_sub': 2,
+ 'int_gt': 2, 'jump': 2})
class TestOOtype(BasicTests, OOJitMixin):
More information about the Pypy-commit
mailing list