[pypy-commit] pypy type_system-cleanup: Kill LowLevelTypeSystem.getexternalcallable
rlamy
noreply at buildbot.pypy.org
Fri Oct 9 05:31:15 CEST 2015
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: type_system-cleanup
Changeset: r80067:f025a9b30012
Date: 2015-10-08 23:06 +0100
http://bitbucket.org/pypy/pypy/changeset/f025a9b30012/
Log: Kill LowLevelTypeSystem.getexternalcallable
diff --git a/rpython/rtyper/extfunc.py b/rpython/rtyper/extfunc.py
--- a/rpython/rtyper/extfunc.py
+++ b/rpython/rtyper/extfunc.py
@@ -1,6 +1,6 @@
from rpython.rtyper import extregistry
from rpython.rtyper.extregistry import ExtRegistryEntry
-from rpython.rtyper.lltypesystem.lltype import typeOf
+from rpython.rtyper.lltypesystem.lltype import typeOf, FuncType, functionptr
from rpython.annotator import model as annmodel
from rpython.annotator.signature import annotation
@@ -200,13 +200,10 @@
obj = rtyper.getannmixlevel().delayedfunction(
impl, signature_args, hop.s_result)
else:
- #if not self.safe_not_sandboxed:
- # print '>>>>>>>>>>>>>-----------------------------------'
- # print name, self.name
- # print '<<<<<<<<<<<<<-----------------------------------'
- obj = rtyper.type_system.getexternalcallable(args_ll, ll_result,
- name, _external_name=self.name, _callable=fakeimpl,
- _safe_not_sandboxed=self.safe_not_sandboxed)
+ FT = FuncType(args_ll, ll_result)
+ obj = functionptr(FT, name, _external_name=self.name,
+ _callable=fakeimpl,
+ _safe_not_sandboxed=self.safe_not_sandboxed)
vlist = [hop.inputconst(typeOf(obj), obj)] + hop.inputargs(*args_r)
hop.exception_is_here()
return hop.genop('direct_call', vlist, r_result)
diff --git a/rpython/rtyper/typesystem.py b/rpython/rtyper/typesystem.py
--- a/rpython/rtyper/typesystem.py
+++ b/rpython/rtyper/typesystem.py
@@ -13,10 +13,6 @@
vlist = hop.inputargs(repr)
return hop.genop('ptr_nonzero', vlist, resulttype=lltype.Bool)
- def getexternalcallable(self, ll_args, ll_result, name, **kwds):
- FT = lltype.FuncType(ll_args, ll_result)
- return lltype.functionptr(FT, name, **kwds)
-
def generic_is(self, robj1, robj2, hop):
roriginal1 = robj1
roriginal2 = robj2
More information about the pypy-commit
mailing list