[pypy-svn] r62767 - pypy/trunk/pypy/jit/metainterp

fijal at codespeak.net fijal at codespeak.net
Mon Mar 9 18:01:19 CET 2009


Author: fijal
Date: Mon Mar  9 18:01:17 2009
New Revision: 62767

Modified:
   pypy/trunk/pypy/jit/metainterp/warmspot.py
Log:
revert a bit of my changes


Modified: pypy/trunk/pypy/jit/metainterp/warmspot.py
==============================================================================
--- pypy/trunk/pypy/jit/metainterp/warmspot.py	(original)
+++ pypy/trunk/pypy/jit/metainterp/warmspot.py	Mon Mar  9 18:01:17 2009
@@ -1,6 +1,7 @@
 import sys
 from pypy.rpython.lltypesystem import lltype, llmemory, rclass
-from pypy.rpython.annlowlevel import llhelper, MixLevelHelperAnnotator
+from pypy.rpython.annlowlevel import llhelper, MixLevelHelperAnnotator,\
+     cast_base_ptr_to_instance
 from pypy.annotation import model as annmodel
 from pypy.rpython.llinterp import LLException
 from pypy.rpython.test.test_llinterp import get_interpreter, clear_tcache
@@ -305,9 +306,13 @@
                     return unwrap(RESULT, e.resultbox)
                 except ExitFrameWithException, e:
                     value = e.valuebox.getptr(lltype.Ptr(rclass.OBJECT))
-                    type = e.typebox.getaddr(self.metainterp.cpu)
-                    type = llmemory.cast_adr_to_ptr(type, rclass.CLASSTYPE)
-                    support.raise_exc_value(type, value)
+                    if we_are_translated():
+                        type = e.typebox.getaddr(self.metainterp.cpu)
+                        type = llmemory.cast_adr_to_ptr(type, rclass.CLASSTYPE)
+                        raise LLException(type, value)
+                    else:
+                        value = cast_base_ptr_to_instance(Exception, value)
+                        raise Exception, value
 
         portal_runner_ptr = self.helper_func(lltype.Ptr(PORTALFUNC),
                                              ll_portal_runner)



More information about the Pypy-commit mailing list