[pypy-svn] r25622 - pypy/dist/pypy/translator/stackless

hpk at codespeak.net hpk at codespeak.net
Sun Apr 9 14:20:32 CEST 2006


Author: hpk
Date: Sun Apr  9 14:20:31 2006
New Revision: 25622

Modified:
   pypy/dist/pypy/translator/stackless/code.py
   pypy/dist/pypy/translator/stackless/transform.py
Log:
(mwh, hpk) fix of one issue but the assertion still fails ...


Modified: pypy/dist/pypy/translator/stackless/code.py
==============================================================================
--- pypy/dist/pypy/translator/stackless/code.py	(original)
+++ pypy/dist/pypy/translator/stackless/code.py	Sun Apr  9 14:20:31 2006
@@ -89,4 +89,15 @@
         u.frame_bottom = frame_state
 
 def resume_state():
-    return global_state.restart_substate
+    x = global_state.restart_substate
+    global_state.restart_substate = 0
+    return x 
+
+# XXX would like to be able to say
+#def resume_header():
+#    x = global_state.restart_substate
+#    if x:
+#        top = global_state.top
+#        global_state.top = None
+# XXX and then insert the rtyped graph of this into functions
+        

Modified: pypy/dist/pypy/translator/stackless/transform.py
==============================================================================
--- pypy/dist/pypy/translator/stackless/transform.py	(original)
+++ pypy/dist/pypy/translator/stackless/transform.py	Sun Apr  9 14:20:31 2006
@@ -188,6 +188,10 @@
             frame_state_type = resume_point.frame_state_type
             frame_top = varoftype(lltype.Ptr(frame_state_type))
             ops.extend(self.ops_read_global_state_field(frame_top, "top"))
+            ops.append(model.SpaceOperation(
+                "setfield", [self.ll_global_state, model.Constant("inst_top", lltype.Void),
+                             model.Constant(null_state, lltype.typeOf(null_state))],
+                            varoftype(lltype.Void)))
             i = 0
             for arg in resume_point.link_to_resumption.args:
                 newarg = copyvar(self.translator, arg)



More information about the Pypy-commit mailing list