[pypy-svn] r49255 - pypy/dist/pypy/translator/jvm

niko at codespeak.net niko at codespeak.net
Sat Dec 1 19:02:44 CET 2007


Author: niko
Date: Sat Dec  1 19:02:44 2007
New Revision: 49255

Modified:
   pypy/dist/pypy/translator/jvm/node.py
Log:
use the new is_generated() test in InterlinkFunction to determine
when the rewrite the signature to use Object, since it applies
there as well -- before we just checked if the type was a reference type



Modified: pypy/dist/pypy/translator/jvm/node.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/node.py	(original)
+++ pypy/dist/pypy/translator/jvm/node.py	Sat Dec  1 19:02:44 2007
@@ -795,11 +795,10 @@
         self.name = name
         self.helper = helper
 
-        # The functions in Interlink.java either return Object,
-        # because they are returning an instance of a class generated
-        # by us which the JVM doesn't know about, or they return a
-        # scalar.
-        if self.helper.return_type.descriptor.is_reference():
+        # Since the names of classes we generate are not statically
+        # known, the functions in Interlink.java simply return
+        # Object when they create an instance of one of those types.
+        if self.helper.return_type.is_generated():
             self.return_type = jObject
         else:
             self.return_type = self.helper.return_type



More information about the Pypy-commit mailing list