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

ericvrp at codespeak.net ericvrp at codespeak.net
Thu Jul 21 13:55:13 CEST 2005


Author: ericvrp
Date: Thu Jul 21 13:55:13 2005
New Revision: 14853

Modified:
   pypy/dist/pypy/translator/llvm2/codewriter.py
   pypy/dist/pypy/translator/llvm2/funcnode.py
Log:
Make os.write..os.read external functions work by added raise (LLVM unwind).
note: exception handling next.


Modified: pypy/dist/pypy/translator/llvm2/codewriter.py
==============================================================================
--- pypy/dist/pypy/translator/llvm2/codewriter.py	(original)
+++ pypy/dist/pypy/translator/llvm2/codewriter.py	Thu Jul 21 13:55:13 2005
@@ -72,6 +72,9 @@
     def ret_void(self):
         self.indent("ret void")
 
+    def unwind(self):
+        self.indent("unwind")
+
     def phi(self, targetvar, type_, refs, blocknames): 
         assert targetvar.startswith('%')
         assert refs and len(refs) == len(blocknames), "phi node requires blocks" 

Modified: pypy/dist/pypy/translator/llvm2/funcnode.py
==============================================================================
--- pypy/dist/pypy/translator/llvm2/funcnode.py	(original)
+++ pypy/dist/pypy/translator/llvm2/funcnode.py	Thu Jul 21 13:55:13 2005
@@ -146,3 +146,6 @@
             codewriter.ret(inputargtype, inputarg)
         else:
             codewriter.ret_void()
+
+    def write_exceptblock(self, codewriter, block):
+        codewriter.unwind()



More information about the Pypy-commit mailing list