[pypy-commit] pypy ppc-jit-backend: Slightly beautified test_call_many_arguments.
hager
noreply at buildbot.pypy.org
Thu Sep 1 18:05:27 CEST 2011
Author: hager <sven.hager at uni-duesseldorf.de>
Branch: ppc-jit-backend
Changeset: r46989:b9eddaa199ec
Date: 2011-09-01 18:03 +0200
http://bitbucket.org/pypy/pypy/changeset/b9eddaa199ec/
Log: Slightly beautified test_call_many_arguments.
diff --git a/pypy/jit/backend/test/runner_test.py b/pypy/jit/backend/test/runner_test.py
--- a/pypy/jit/backend/test/runner_test.py
+++ b/pypy/jit/backend/test/runner_test.py
@@ -629,18 +629,18 @@
def test_call_many_arguments(self):
# Test calling a function with a large number of arguments (more than
# 6, which will force passing some arguments on the stack on 64-bit)
-
+ num_args = 16
def func(*args):
- assert len(args) == 16
+ assert len(args) == num_args
# Try to sum up args in a way that would probably detect a
# transposed argument
return sum(arg * (2**i) for i, arg in enumerate(args))
- FUNC = self.FuncType([lltype.Signed]*16, lltype.Signed)
+ FUNC = self.FuncType([lltype.Signed]*num_args, lltype.Signed)
FPTR = self.Ptr(FUNC)
calldescr = self.cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT)
func_ptr = llhelper(FPTR, func)
- args = range(16)
+ args = range(num_args)
funcbox = self.get_funcbox(self.cpu, func_ptr)
res = self.execute_operation(rop.CALL, [funcbox] + map(BoxInt, args), 'int', descr=calldescr)
assert res.value == func(*args)
More information about the pypy-commit
mailing list