Author: Maciej Fijalkowski <[email protected]>
Branch: kill-gen-store-back-in
Changeset: r64567:7d4b2887e29f
Date: 2013-05-26 16:49 +0200
http://bitbucket.org/pypy/pypy/changeset/7d4b2887e29f/

Log:    figure stuff out - this fixes test_recusrive on llgraph backend

diff --git a/rpython/jit/metainterp/pyjitpl.py 
b/rpython/jit/metainterp/pyjitpl.py
--- a/rpython/jit/metainterp/pyjitpl.py
+++ b/rpython/jit/metainterp/pyjitpl.py
@@ -2473,7 +2473,7 @@
             virtualizable_box = self.virtualizable_boxes[-1]
             virtualizable = vinfo.unwrap_virtualizable_box(virtualizable_box)
             if vinfo.is_token_nonnull_gcref(virtualizable):
-                vinfo.clear_vable_token(virtualizable)
+                vinfo.reset_token_gcref(virtualizable)
             # fill the virtualizable with the local boxes
             self.synchronize_virtualizable()
         #
diff --git a/rpython/jit/metainterp/resume.py b/rpython/jit/metainterp/resume.py
--- a/rpython/jit/metainterp/resume.py
+++ b/rpython/jit/metainterp/resume.py
@@ -1216,17 +1216,8 @@
             return len(numb.nums)
         index = len(numb.nums) - 1
         virtualizable = self.decode_ref(numb.nums[index])
-        if self.resume_after_guard_not_forced == 1:
-            # in the middle of handle_async_forcing()
-            assert vinfo.is_token_nonnull_gcref(virtualizable)
-            vinfo.reset_token_gcref(virtualizable)
-        else:
-            # just jumped away from assembler (case 4 in the comment in
-            # virtualizable.py) into tracing (case 2); we might have non-forced
-            # virtualizable here, in case it comes from somewhere strange, just
-            # force it
-            if vinfo.is_token_nonnull_gcref(virtualizable):
-                vinfo.clear_vable_token(virtualizable)
+        # just reset the token, we'll force it later
+        vinfo.reset_token_gcref(virtualizable)
         return vinfo.write_from_resume_data_partial(virtualizable, self, numb)
 
     def load_value_of_type(self, TYPE, tagged):
diff --git a/rpython/jit/metainterp/virtualizable.py 
b/rpython/jit/metainterp/virtualizable.py
--- a/rpython/jit/metainterp/virtualizable.py
+++ b/rpython/jit/metainterp/virtualizable.py
@@ -275,6 +275,10 @@
             virtualizable.vable_token = TOKEN_NONE
         self.reset_token_gcref = reset_token_gcref
 
+        def reset_vable_token(virtualizable):
+            virtualizable.vable_token = TOKEN_NONE
+        self.reset_vable_token = reset_vable_token
+
     def _freeze_(self):
         return True
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to