Author: Richard Plangger <[email protected]>
Branch: cpyext-callopt
Changeset: r90480:0dc57c3147d2
Date: 2017-03-02 14:11 +0100
http://bitbucket.org/pypy/pypy/changeset/0dc57c3147d2/
Log: add comments we found during the sprint session in the morning
diff --git a/pypy/module/cpyext/methodobject.py
b/pypy/module/cpyext/methodobject.py
--- a/pypy/module/cpyext/methodobject.py
+++ b/pypy/module/cpyext/methodobject.py
@@ -44,6 +44,7 @@
class W_PyCFunctionObject(W_Root):
+ # TODO create a slightly different class depending on the c_ml_flags
def __init__(self, space, ml, w_self, w_module=None):
self.ml = ml
self.name = rffi.charp2str(rffi.cast(rffi.CCHARP,self.ml.c_ml_name))
@@ -56,6 +57,7 @@
w_self = self.w_self
flags = rffi.cast(lltype.Signed, self.ml.c_ml_flags)
flags &= ~(METH_CLASS | METH_STATIC | METH_COEXIST)
+ # XXX spent a lot of time
if space.is_true(w_kw) and not flags & METH_KEYWORDS:
raise oefmt(space.w_TypeError,
"%s() takes no keyword arguments", self.name)
@@ -192,8 +194,10 @@
def cfunction_descr_call(space, w_self, __args__):
+ # specialize depending on the W_PyCFunctionObject
self = space.interp_w(W_PyCFunctionObject, w_self)
args_w, kw_w = __args__.unpack()
+ # XXX __args__.unpack is slow
w_args = space.newtuple(args_w)
w_kw = space.newdict()
for key, w_obj in kw_w.items():
diff --git a/pypy/module/pypyjit/policy.py b/pypy/module/pypyjit/policy.py
--- a/pypy/module/pypyjit/policy.py
+++ b/pypy/module/pypyjit/policy.py
@@ -14,7 +14,7 @@
return True
if '.' in modname:
modname, rest = modname.split('.', 1)
- if modname in ['unicodedata', 'gc', '_minimal_curses', 'cpyext']:
+ if modname in ['unicodedata', 'gc', '_minimal_curses']:
return False
else:
rest = ''
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit