[pypy-svn] r64675 - pypy/branch/pyjitpl5/pypy/jit/metainterp

arigo at codespeak.net arigo at codespeak.net
Sat Apr 25 18:14:43 CEST 2009


Author: arigo
Date: Sat Apr 25 18:14:43 2009
New Revision: 64675

Modified:
   pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py
   pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py
Log:
Revert r64577: I'm not completely sure I get it, but it seems
related to the accident in r63642 (fixed in r64673).


Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py	Sat Apr 25 18:14:43 2009
@@ -865,9 +865,6 @@
 # ____________________________________________________________
 
 class MetaInterpGlobalData(object):
-
-    blackhole = False
-    
     def __init__(self):
         self.metainterp_doing_call = None
         self._debug_history = []
@@ -1284,7 +1281,6 @@
                     self.history.operations.append(suboperations[i])
                 self.extra_rebuild_operations = extra
         if not must_compile:
-            self.staticdata.globaldata.blackhole = True
             self.history = history.BlackHole(self.cpu)
             # the BlackHole is invalid because it doesn't start with
             # guard_failure.key.guard_op.suboperations, but that's fine

Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py	Sat Apr 25 18:14:43 2009
@@ -189,8 +189,6 @@
 
         def maybe_enter_jit(*args):
             try:
-                if self.metainterp_sd.globaldata.blackhole:
-                    return
                 state.maybe_compile_and_run(*args)
             except JitException:
                 raise     # go through
@@ -323,25 +321,22 @@
         def ll_portal_runner(*args):
             while 1:
                 try:
-                    try:
-                        return support.maybe_on_top_of_llinterp(rtyper,
-                                                          portal_ptr)(*args)
-                    except ContinueRunningNormally, e:
-                        args = ()
-                        for i, ARG in portalfunc_ARGS:
-                            v = unwrap(ARG, e.args[i])
-                            args = args + (v,)
-                    except DoneWithThisFrame, e:
-                        return unwrap(RESULT, e.resultbox)
-                    except ExitFrameWithException, e:
-                        value = e.valuebox.getptr(lltype.Ptr(rclass.OBJECT))
-                        if not we_are_translated():
-                            raise LLException(value.typeptr, value)
-                        else:
-                            value = cast_base_ptr_to_instance(Exception, value)
-                            raise Exception, value
-                finally:
-                    self.metainterp_sd.globaldata.blackhole = False
+                    return support.maybe_on_top_of_llinterp(rtyper,
+                                                      portal_ptr)(*args)
+                except ContinueRunningNormally, e:
+                    args = ()
+                    for i, ARG in portalfunc_ARGS:
+                        v = unwrap(ARG, e.args[i])
+                        args = args + (v,)
+                except DoneWithThisFrame, e:
+                    return unwrap(RESULT, e.resultbox)
+                except ExitFrameWithException, e:
+                    value = e.valuebox.getptr(lltype.Ptr(rclass.OBJECT))
+                    if not we_are_translated():
+                        raise LLException(value.typeptr, value)
+                    else:
+                        value = cast_base_ptr_to_instance(Exception, value)
+                        raise Exception, value
         ll_portal_runner._recursive_portal_call_ = True
 
         portal_runner_ptr = self.helper_func(self.PTR_PORTAL_FUNCTYPE,



More information about the Pypy-commit mailing list