[pypy-svn] r32847 - pypy/dist/pypy/jit/timeshifter

arigo at codespeak.net arigo at codespeak.net
Tue Oct 3 17:41:13 CEST 2006


Author: arigo
Date: Tue Oct  3 17:41:07 2006
New Revision: 32847

Modified:
   pypy/dist/pypy/jit/timeshifter/rtimeshift.py
Log:
Also detect CompiledInterrupted case at the end of a yellow call.


Modified: pypy/dist/pypy/jit/timeshifter/rtimeshift.py
==============================================================================
--- pypy/dist/pypy/jit/timeshifter/rtimeshift.py	(original)
+++ pypy/dist/pypy/jit/timeshifter/rtimeshift.py	Tue Oct  3 17:41:07 2006
@@ -10,8 +10,8 @@
 
 FOLDABLE_OPS = dict.fromkeys(lloperation.enum_foldable_ops())
 
-def debug_view(*ll_objects):
-    lloperation.llop.debug_view(lltype.Void, *ll_objects)
+debug_view = lloperation.llop.debug_view
+debug_print = lloperation.llop.debug_print
 
 # ____________________________________________________________
 # emit ops
@@ -576,7 +576,7 @@
 
             promotenode = resuming.path.pop()
             assert isinstance(promotenode, PromotionPathPromote)
-            #debug_view(promotenode, resuming, incoming)
+            #debug_view(lltype.Void, promotenode, resuming, incoming)
             pm = promotenode.promotion_point
             assert pm.promotion_path is promotenode.next
 
@@ -813,6 +813,7 @@
 def merge_returning_jitstates(jitstate):
     dispatchqueue = jitstate.frame.dispatchqueue
     return_chain = dispatchqueue.return_chain
+    resuming = jitstate.resuming
     return_cache = {}
     still_pending = None
     while return_chain is not None:
@@ -824,6 +825,7 @@
             jitstate.next = still_pending
             still_pending = jitstate
     if still_pending is None:
+        assert resuming is None
         raise CompilationInterrupted
     most_general_jitstate = still_pending
     still_pending = still_pending.next
@@ -834,7 +836,6 @@
                                           return_marker)
         assert res is True   # finished
 
-    resuming = most_general_jitstate.resuming
     if resuming is not None:
         resuming.leave_call(dispatchqueue)
         
@@ -873,8 +874,13 @@
 def leave_graph_yellow(jitstate):
     mydispatchqueue = jitstate.frame.dispatchqueue
     return_chain = mydispatchqueue.return_chain
-    jitstate = return_chain
     resuming = jitstate.resuming
+    if return_chain is None:
+        assert resuming is None
+        raise CompilationInterrupted
+    if resuming is not None:
+        resuming.leave_call(mydispatchqueue)
+    jitstate = return_chain
     if resuming is not None:
         resuming.leave_call(mydispatchqueue)
     while jitstate is not None:



More information about the Pypy-commit mailing list