[pypy-svn] r65674 - in pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm: . test

arigo at codespeak.net arigo at codespeak.net
Mon Jun 8 21:47:02 CEST 2009


Author: arigo
Date: Mon Jun  8 21:47:01 2009
New Revision: 65674

Modified:
   pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/compile.py
   pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/test/test_runner.py
Log:
test_ooops_non_gc.


Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/compile.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/compile.py	(original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/compile.py	Mon Jun  8 21:47:01 2009
@@ -227,10 +227,15 @@
                                         self.cpu.ty_char_ptr_ptr)
         else:
             ty = llvm_rffi.LLVMTypeOf(value_ref)
-            assert (ty != self.cpu.ty_int and
-                    ty != self.cpu.ty_bit and
-                    ty != self.cpu.ty_char and
-                    ty != self.cpu.ty_unichar)
+            if ty == self.cpu.ty_int:
+                value_ref = llvm_rffi.LLVMBuildIntToPtr(self.builder,
+                                                        value_ref,
+                                                        self.cpu.ty_char_ptr,
+                                                        "")
+            else:
+                assert (ty != self.cpu.ty_bit and
+                        ty != self.cpu.ty_char and
+                        ty != self.cpu.ty_unichar)
             return value_ref
 
     for _opname, _llvmname in [('INT_ADD', 'Add'),

Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/test/test_runner.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/test/test_runner.py	(original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/test/test_runner.py	Mon Jun  8 21:47:01 2009
@@ -16,4 +16,3 @@
         py.test.skip("in-progress")
 
     test_executor = _skip
-    test_ooops_non_gc = _skip



More information about the Pypy-commit mailing list