[pypy-svn] r14124 - pypy/dist/pypy/translator/llvm2

hpk at codespeak.net hpk at codespeak.net
Sun Jul 3 12:50:37 CEST 2005


Author: hpk
Date: Sun Jul  3 12:50:36 2005
New Revision: 14124

Modified:
   pypy/dist/pypy/translator/llvm2/arraynode.py
   pypy/dist/pypy/translator/llvm2/genllvm.py
   pypy/dist/pypy/translator/llvm2/node.py
   pypy/dist/pypy/translator/llvm2/structnode.py
Log:
small renaming and a bit of docstrings


Modified: pypy/dist/pypy/translator/llvm2/arraynode.py
==============================================================================
--- pypy/dist/pypy/translator/llvm2/arraynode.py	(original)
+++ pypy/dist/pypy/translator/llvm2/arraynode.py	Sun Jul  3 12:50:36 2005
@@ -70,7 +70,7 @@
 
         return ", ".join(["%s %s" % (t, v) for t, v in res])
 
-    def writedata(self, codewriter):
+    def writeglobalconstants(self, codewriter):
         lenitems = len(self.value.items)
         lenstr = ".%s" % lenitems
         codewriter.globalinstance(self.ref,

Modified: pypy/dist/pypy/translator/llvm2/genllvm.py
==============================================================================
--- pypy/dist/pypy/translator/llvm2/genllvm.py	(original)
+++ pypy/dist/pypy/translator/llvm2/genllvm.py	Sun Jul  3 12:50:36 2005
@@ -31,7 +31,7 @@
 
     nl(); comment("Global Data") ; nl()
     for typ_decl in db.getobjects():
-        typ_decl.writedata(codewriter)
+        typ_decl.writeglobalconstants(codewriter)
 
     nl(); comment("Function Prototypes") ; nl()
     for typ_decl in db.getobjects():

Modified: pypy/dist/pypy/translator/llvm2/node.py
==============================================================================
--- pypy/dist/pypy/translator/llvm2/node.py	(original)
+++ pypy/dist/pypy/translator/llvm2/node.py	Sun Jul  3 12:50:36 2005
@@ -8,14 +8,18 @@
         self._ref = ref
     ref = property(_get_ref, _set_ref)
 
+    # __________________ before "implementation" ____________________
     def writedatatypedecl(self, codewriter):
-        pass
+        """ write out declare names of data types 
+            (structs/arrays/function pointers)
+        """
 
-    def writedata(self, codewriter):
-        pass
+    def writeglobalconstants(self, codewriter):
+        """ write out global values.  """
 
     def writedecl(self, codewriter):
-        pass
+        """ write function forward declarations. """ 
 
+    # __________________ after "implementation" ____________________
     def writeimpl(self, codewriter):
-        pass
+        """ write function implementations. """ 

Modified: pypy/dist/pypy/translator/llvm2/structnode.py
==============================================================================
--- pypy/dist/pypy/translator/llvm2/structnode.py	(original)
+++ pypy/dist/pypy/translator/llvm2/structnode.py	Sun Jul  3 12:50:36 2005
@@ -118,7 +118,7 @@
             res.append((self.db.repr_arg_type(T), value))
         return ", ".join(["%s %s" % (t, v) for t, v in res])
 
-    def writedata(self, codewriter):
+    def writeglobalconstants(self, codewriter):
         codewriter.globalinstance(self.ref,
                                   self.db.repr_arg_type(self.value._TYPE),
                                   self.get_values())



More information about the Pypy-commit mailing list