[pypy-svn] r39366 - pypy/dist/pypy/translator/oosupport

fijal at codespeak.net fijal at codespeak.net
Sat Feb 24 17:49:53 CET 2007


Author: fijal
Date: Sat Feb 24 17:49:45 2007
New Revision: 39366

Modified:
   pypy/dist/pypy/translator/oosupport/metavm.py
Log:
Lift need of external functions to have suggested_primitive set
(we need better way of handling that I fear)


Modified: pypy/dist/pypy/translator/oosupport/metavm.py
==============================================================================
--- pypy/dist/pypy/translator/oosupport/metavm.py	(original)
+++ pypy/dist/pypy/translator/oosupport/metavm.py	Sat Feb 24 17:49:45 2007
@@ -13,6 +13,7 @@
 
 from pypy.rpython.ootypesystem import ootype
 from pypy.rpython.ootypesystem.bltregistry import ExternalType
+from pypy.rpython.extfunc import ExtFuncEntry, is_external
 
 class Generator(object):
     
@@ -324,7 +325,8 @@
 class _CallDispatcher(_GeneralDispatcher):
     def render(self, generator, op):
         func = op.args[0]
-        if getattr(func.value._callable, 'suggested_primitive', False):
+        # XXX we need to sort out stuff here at some point
+        if is_external(func):
             func_name = func.value._name.split("__")[0]
             try:
                 return self.builtins.builtin_map[func_name](generator, op)



More information about the Pypy-commit mailing list