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

ericvrp at codespeak.net ericvrp at codespeak.net
Fri Sep 16 22:25:59 CEST 2005


Author: ericvrp
Date: Fri Sep 16 22:25:58 2005
New Revision: 17605

Modified:
   pypy/dist/pypy/translator/llvm/genllvm.py
   pypy/dist/pypy/translator/llvm/module/support.py
Log:
Fixes for using the correct predeclared RPystring functions


Modified: pypy/dist/pypy/translator/llvm/genllvm.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/genllvm.py	(original)
+++ pypy/dist/pypy/translator/llvm/genllvm.py	Fri Sep 16 22:25:58 2005
@@ -119,6 +119,7 @@
         # set up all nodes
         self.db.setup_all()
         self.entrynode = self.db.set_entrynode(entry_point)
+        entryfunc_name = self.entrynode.getdecl().split('%', 1)[1].split('(')[0]
         self._checkpoint('setup_all')
 
         # post set up externs
@@ -193,9 +194,6 @@
         codewriter.append(self.exceptionpolicy.pyrex_entrypoint_code(self.entrynode))
 
         # XXX we need to create our own main() that calls the actual entry_point function
-        decl = self.entrynode.getdecl()
-        t = decl.split('%', 1)
-        entryfunc_name = t[1].split('(')[0]
         if entryfunc_name == 'pypy_entry_point': #XXX just to get on with translate_pypy
             extfuncnode.ExternalFuncNode.used_external_functions['%main'] = True
 

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	Fri Sep 16 22:25:58 2005
@@ -264,7 +264,7 @@
 extfunctions["%main"] = [(), """
 int %main(int %argc, sbyte** %argv) {
 entry:
-    %pypy_argv = call fastcc %structtype.list* %pypy_ll_newlist__Ptr_GcStruct_listLlT_Signed(int 0)
+    %pypy_argv = call fastcc %structtype.list* %pypy__RPyListOfString_New__Signed(int %argc)
     br label %no_exit
 
 no_exit:
@@ -273,7 +273,7 @@
     %tmp.8 = getelementptr sbyte** %argv, uint %indvar
     %tmp.9 = load sbyte** %tmp.8
     %rpy = call fastcc %RPyString* %RPyString_FromString(sbyte* %tmp.9)
-    call fastcc void %pypy_ll_append__listPtr_rpy_stringPtr(%structtype.list* %pypy_argv, %RPyString* %rpy)
+    call fastcc void %pypy__RPyListOfString_SetItem__listPtr_Signed_rpy_stringPtr(%structtype.list* %pypy_argv, int %i.0.0, %RPyString* %rpy)
     %inc = add int %i.0.0, 1
     %tmp.2 = setlt int %inc, %argc
     %indvar.next = add uint %indvar, 1



More information about the Pypy-commit mailing list