[pypy-svn] r20382 - in pypy/branch/somepbc-refactoring/pypy: rpython translator

arigo at codespeak.net arigo at codespeak.net
Tue Nov 29 12:26:12 CET 2005


Author: arigo
Date: Tue Nov 29 12:26:11 2005
New Revision: 20382

Modified:
   pypy/branch/somepbc-refactoring/pypy/rpython/rpbc.py
   pypy/branch/somepbc-refactoring/pypy/translator/annrpython.py
Log:
Fix a new failure in test_rpbc.


Modified: pypy/branch/somepbc-refactoring/pypy/rpython/rpbc.py
==============================================================================
--- pypy/branch/somepbc-refactoring/pypy/rpython/rpbc.py	(original)
+++ pypy/branch/somepbc-refactoring/pypy/rpython/rpbc.py	Tue Nov 29 12:26:11 2005
@@ -20,7 +20,8 @@
         kind = self.getKind()
         if issubclass(kind, description.FunctionDesc):
             sample = self.descriptions.keys()[0]
-            if sample.querycallfamily():
+            callfamily = sample.querycallfamily()
+            if callfamily and callfamily.total_calltable_size > 0:
                 if sample.overridden:
                     getRepr = OverriddenFunctionPBCRepr
                 else:

Modified: pypy/branch/somepbc-refactoring/pypy/translator/annrpython.py
==============================================================================
--- pypy/branch/somepbc-refactoring/pypy/translator/annrpython.py	(original)
+++ pypy/branch/somepbc-refactoring/pypy/translator/annrpython.py	Tue Nov 29 12:26:11 2005
@@ -84,7 +84,7 @@
         inputcells = [self.typeannotation(t) for t in input_arg_types]
 
         desc = self.bookkeeper.getdesc(function)
-        desc.getcallfamily()
+        desc.getcallfamily()   # record this implicit call (hint for back-ends)
         flowgraph = desc.specialize(inputcells)
         if not isinstance(flowgraph, FunctionGraph):
             assert isinstance(flowgraph, annmodel.SomeObject)



More information about the Pypy-commit mailing list