[pypy-svn] r18456 - pypy/dist/pypy/translator/c

tismer at codespeak.net tismer at codespeak.net
Wed Oct 12 12:14:26 CEST 2005


Author: tismer
Date: Wed Oct 12 12:14:25 2005
New Revision: 18456

Modified:
   pypy/dist/pypy/translator/c/stackless.py
Log:
removed direct references to concretetype, used lltypemap() instead.
Although I think this should be refactored by providing some
default, so concretetype is always valid.

Modified: pypy/dist/pypy/translator/c/stackless.py
==============================================================================
--- pypy/dist/pypy/translator/c/stackless.py	(original)
+++ pypy/dist/pypy/translator/c/stackless.py	Wed Oct 12 12:14:25 2005
@@ -170,10 +170,10 @@
             # record extra data needed to generate the slp_*.h tables:
             # find the signatures of all functions
             slpdata = self.db.stacklessdata
-            argtypes = [signature_type(v.concretetype)
+            argtypes = [signature_type(self.lltypemap(v))
                         for v in self.graph.getargs()]
             argtypes = [T for T in argtypes if T is not lltype.Void]
-            rettype = signature_type(self.graph.getreturnvar().concretetype)
+            rettype = signature_type(self.lltypemap(self.graph.getreturnvar()))
             FUNC = lltype.FuncType(argtypes, rettype)
             slpdata.registerunwindable(self.functionname, FUNC,
                                        resume_points = len(self.resumeblocks))
@@ -191,7 +191,7 @@
         counts = dict([(type, []) for type in STATE_TYPES])
         variables_to_restore = []
         for v in vars:
-            st = storage_type(v.concretetype)
+            st = storage_type(self.lltypemap(v))
             if st is not None:   # ignore the Voids
                 varname = self.expr(v)
                 # The name of the field in the structure is computed from
@@ -233,7 +233,7 @@
                 varname, cdecl(vartype, ''), structname, fieldname))
         retvarname = self.expr(op.result)
         retvartype = self.lltypename(op.result)
-        retvarst = storage_type(op.result.concretetype)
+        retvarst = storage_type(self.lltypemap(op.result))
         if retvarst is not None:
             globalretvalvarname = retvarst.global_name
             lines.append('%s = (%s) %s;' % (



More information about the Pypy-commit mailing list