Author: Armin Rigo <[email protected]>
Branch: fast-slowpath
Changeset: r65543:bf22340c9ecd
Date: 2013-07-23 11:33 +0200
http://bitbucket.org/pypy/pypy/changeset/bf22340c9ecd/
Log: In get_unique_llfn(), ignore the "non-simple" calls and pick the one
call which is a simple call.
diff --git a/rpython/rlib/jit.py b/rpython/rlib/jit.py
--- a/rpython/rlib/jit.py
+++ b/rpython/rlib/jit.py
@@ -1021,8 +1021,9 @@
def specialize_call(self, hop):
from rpython.rtyper.lltypesystem import lltype
+ args_v = hop.inputargs(lltype.Bool, lltype.Void, *hop.args_r[2:])
+ args_v[1] = hop.args_r[1].get_unique_llfn()
hop.exception_is_here()
- args_v = hop.inputargs(lltype.Bool, lltype.Void, *hop.args_r[2:])
return hop.genop('jit_conditional_call', args_v)
class Counters(object):
diff --git a/rpython/rtyper/rpbc.py b/rpython/rtyper/rpbc.py
--- a/rpython/rtyper/rpbc.py
+++ b/rpython/rtyper/rpbc.py
@@ -283,9 +283,13 @@
assert len(self.s_pbc.descriptions) == 1
# lowleveltype wouldn't be Void otherwise
funcdesc, = self.s_pbc.descriptions
- if len(self.callfamily.calltables) != 1:
+ tables = [] # find the simple call in the calltable
+ for key, table in self.callfamily.calltables.items():
+ if not key[1] and not key[2] and not key[3]:
+ tables.append(table)
+ if len(tables) != 1:
raise TyperError("cannot pass a function with various call shapes")
- table, = self.callfamily.calltables.values()
+ table, = tables
graphs = []
for row in table:
if funcdesc in row:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit