[pypy-svn] r17517 - in pypy/dist/pypy/translator/llvm: . module

ericvrp at codespeak.net ericvrp at codespeak.net
Tue Sep 13 10:37:36 CEST 2005


Author: ericvrp
Date: Tue Sep 13 10:37:35 2005
New Revision: 17517

Modified:
   pypy/dist/pypy/translator/llvm/codewriter.py
   pypy/dist/pypy/translator/llvm/module/support.py
   pypy/dist/pypy/translator/llvm/opwriter.py
Log:
update to be compatible with latest list changes


Modified: pypy/dist/pypy/translator/llvm/codewriter.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/codewriter.py	(original)
+++ pypy/dist/pypy/translator/llvm/codewriter.py	Tue Sep 13 10:37:35 2005
@@ -111,16 +111,20 @@
     # "tail" even if they do not occur before a ret instruction. 
     def call(self, targetvar, returntype, functionref, argrefs, argtypes, tail=DEFAULT_TAIL, cconv=DEFAULT_CCONV):
         if cconv is not 'fastcc':
-            tail = ''
+            tail_ = ''
+        else:
+            tail_ = tail + ' '
         arglist = ["%s %s" % item for item in zip(argtypes, argrefs)]
-        self.indent("%s = %s call %s %s %s(%s)" % (targetvar, tail, cconv, returntype, functionref,
+        self.indent("%s = %scall %s %s %s(%s)" % (targetvar, tail_, cconv, returntype, functionref,
                                              ", ".join(arglist)))
 
     def call_void(self, functionref, argrefs, argtypes, tail=DEFAULT_TAIL, cconv=DEFAULT_CCONV):
         if cconv is not 'fastcc':
-            tail = ''
+            tail_ = ''
+        else:
+            tail_ = tail + ' '
         arglist = ["%s %s" % item for item in zip(argtypes, argrefs)]
-        self.indent("%s call %s void %s(%s)" % (tail, cconv, functionref, ", ".join(arglist)))
+        self.indent("%scall %s void %s(%s)" % (tail_, cconv, functionref, ", ".join(arglist)))
 
     def invoke(self, targetvar, returntype, functionref, argrefs, argtypes, label, except_label, cconv=DEFAULT_CCONV):
         arglist = ["%s %s" % item for item in zip(argtypes, argrefs)]

Modified: pypy/dist/pypy/translator/llvm/module/support.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/module/support.py	(original)
+++ pypy/dist/pypy/translator/llvm/module/support.py	Tue Sep 13 10:37:35 2005
@@ -264,7 +264,7 @@
 extfunctions["%main"] = [(), """
 int %main(int %argc, sbyte** %argv) {
 entry:
-    %pypy_argv = call fastcc %RPyListOfString* %pypy_ll_newlist__listPtrConst_Signed.2(int 0)
+    %pypy_argv = call fastcc %RPyListOfString* %pypy_ll_newlist__Ptr_GcStruct_listLlT_Signed.2(int 0)
     br label %no_exit
 
 no_exit:

Modified: pypy/dist/pypy/translator/llvm/opwriter.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/opwriter.py	(original)
+++ pypy/dist/pypy/translator/llvm/opwriter.py	Tue Sep 13 10:37:35 2005
@@ -327,8 +327,13 @@
         block_label = self.node.block_to_name[self.block]
         exc_label   = block_label + '_exception_handling'
 
+
+
+
+
+
         if returntype != "void":
-            if self.db.is_function_ptr(op.result):
+            if self.db.is_function_ptr(op.result):  #use longhand form
                 returntype = "%s (%s)*" % (returntype, ", ".join(argtypes))
             self.codewriter.invoke(targetvar, returntype, functionref, argrefs,
                                    argtypes, none_label, exc_label)
@@ -403,6 +408,13 @@
             
             self.codewriter.br_uncond(target)
 
+
+
+
+
+
+
+
     def malloc(self, op): 
         arg_type = op.args[0].value
         targetvar = self.db.repr_arg(op.result) 



More information about the Pypy-commit mailing list