Author: Maciej Fijalkowski <[email protected]>
Branch: unroll-if-const
Changeset: r45972:26e58f6d6065
Date: 2011-07-25 18:44 +0200
http://bitbucket.org/pypy/pypy/changeset/26e58f6d6065/
Log: pass also funcbox
diff --git a/pypy/jit/codewriter/jtransform.py
b/pypy/jit/codewriter/jtransform.py
--- a/pypy/jit/codewriter/jtransform.py
+++ b/pypy/jit/codewriter/jtransform.py
@@ -347,7 +347,8 @@
called_from=self.graph)
no = targetgraph.func._jit_unroll_if_const_[0]
c_no = Constant(no, lltype.Signed)
- op0 = self.rewrite_call(op, 'inline_ifconst_call', [jitcode, c_no])
+ op0 = self.rewrite_call(op, 'inline_ifconst_call', [jitcode, c_no,
+ op.args[0]])
op1 = SpaceOperation('-live-', [], None)
return [op0, op1]
diff --git a/pypy/jit/codewriter/test/test_jtransform.py
b/pypy/jit/codewriter/test/test_jtransform.py
--- a/pypy/jit/codewriter/test/test_jtransform.py
+++ b/pypy/jit/codewriter/test/test_jtransform.py
@@ -331,7 +331,8 @@
assert op0.opname == 'inline_ifconst_call_%s_%s' % (expectedkind, reskind)
assert op0.args[0] == 'somejitcode'
assert op0.args[1].value == 0
- assert len(op0.args) == 2 + len(expectedkind)
+ assert op0.args[2] == op.args[0]
+ assert len(op0.args) == 3 + len(expectedkind)
def direct_call_test(argtypes, restype, expectedkind):
op = get_direct_call_op(argtypes, restype)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit