[pypy-svn] pypy fast-forward: Remove this workaround, which should not be needed any more.
arigo
commits-noreply at bitbucket.org
Sun Dec 19 11:52:27 CET 2010
Author: Armin Rigo <arigo at tunes.org>
Branch: fast-forward
Changeset: r40122:672bc9204bff
Date: 2010-12-18 12:47 +0100
http://bitbucket.org/pypy/pypy/changeset/672bc9204bff/
Log: Remove this workaround, which should not be needed any more.
diff --git a/pypy/module/cpyext/funcobject.py b/pypy/module/cpyext/funcobject.py
--- a/pypy/module/cpyext/funcobject.py
+++ b/pypy/module/cpyext/funcobject.py
@@ -65,26 +65,6 @@
assert isinstance(w_method, Method)
return borrow_from(w_method, w_method.w_class)
-# XXX Something that annotates as a list of (W_Root or None)
-# XXX looks like a bug in make_sure_not_modified() used by PyCode.___init__
-# XXX which also depends on the annotation order
-def consts_w():
- return []
-
-from pypy.rpython import extregistry
-class For_some_const(extregistry.ExtRegistryEntry):
- _about_ = consts_w
-
- def compute_result_annotation(self):
- from pypy.annotation import model as annmodel
- from pypy.interpreter.baseobjspace import W_Root
- clsdef = self.bookkeeper.getuniqueclassdef(W_Root)
- s_value = annmodel.SomeInstance(clsdef, can_be_None=True)
- return self.bookkeeper.newlist(s_value)
-
- def specialize_call(self, hop):
- return hop.rtyper.type_system.rlist.newlist(hop.llops, hop.r_result, [])
-
@cpython_api([CONST_STRING, CONST_STRING, rffi.INT_real], PyObject)
def PyCode_NewEmpty(space, filename, funcname, firstlineno):
"""Creates a new empty code object with the specified source location."""
@@ -94,7 +74,7 @@
stacksize=0,
flags=0,
code="",
- consts=consts_w(),
+ consts=[],
names=[],
varnames=[],
filename=rffi.charp2str(filename),
More information about the Pypy-commit
mailing list