[pypy-svn] r13068 - in pypy/dist/pypy: annotation translator/test
pedronis at codespeak.net
pedronis at codespeak.net
Sun Jun 5 03:57:28 CEST 2005
Author: pedronis
Date: Sun Jun 5 03:57:28 2005
New Revision: 13068
Modified:
pypy/dist/pypy/annotation/bookkeeper.py
pypy/dist/pypy/translator/test/test_annrpython.py
Log:
don't support __call__ anymore, not used by PyPy itself
(some planning comment about an intf for later phases to query about specialization)
Modified: pypy/dist/pypy/annotation/bookkeeper.py
==============================================================================
--- pypy/dist/pypy/annotation/bookkeeper.py (original)
+++ pypy/dist/pypy/annotation/bookkeeper.py Sun Jun 5 03:57:28 2005
@@ -375,6 +375,10 @@
return unionof(*results)
+ # decide_callable(position, func, args, mono) -> callb, key
+ # query_spaceop_callable(spaceop) -> pbc
+ # get_s_init(decided_cls) -> classdef, s_undecided_init
+
def get_s_init(self, cls, position=None, mono=True):
specialize = getattr(cls, "_specialize_", False)
if specialize:
@@ -419,9 +423,6 @@
raise Exception, "no __init__ found in %r" % (cls,)
return s_instance
- if hasattr(func, '__call__') and \
- isinstance(func.__call__, MethodType):
- func = func.__call__
if hasattr(func, 'im_func'):
if func.im_self is not None:
s_self = self.immutablevalue(func.im_self)
Modified: pypy/dist/pypy/translator/test/test_annrpython.py
==============================================================================
--- pypy/dist/pypy/translator/test/test_annrpython.py (original)
+++ pypy/dist/pypy/translator/test/test_annrpython.py Sun Jun 5 03:57:28 2005
@@ -293,11 +293,6 @@
a.simplify()
#a.translator.view()
- def test_call_pbc(self):
- a = self.RPythonAnnotator()
- s = a.build_types(snippet.call_cpbc, [])
- assert s == a.bookkeeper.immutablevalue(42)
-
def test_flow_type_info(self):
a = self.RPythonAnnotator()
s = a.build_types(snippet.flow_type_info, [object])
More information about the Pypy-commit
mailing list