[pypy-commit] extradoc extradoc: Fix again...

arigo noreply at buildbot.pypy.org
Sun Aug 19 18:35:53 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: extradoc
Changeset: r4712:a421a1de7be3
Date: 2012-08-19 18:35 +0200
http://bitbucket.org/pypy/extradoc/changeset/a421a1de7be3/

Log:	Fix again...

diff --git a/talk/stm2012/stmimpl.rst b/talk/stm2012/stmimpl.rst
--- a/talk/stm2012/stmimpl.rst
+++ b/talk/stm2012/stmimpl.rst
@@ -252,11 +252,15 @@
     def WriteBarrier(P):
         if P->h_written:          # fast-path
             return P
-        if P->h_possibly_outdated:
-            R = LatestGlobalRevision(P)
+        if not P->h_global:
+            W = P
+            R = W->h_revision
         else:
-            R = P
-        W = Localize(R)
+            if P->h_possibly_outdated:
+                R = LatestGlobalRevision(P)
+            else:
+                R = P
+            W = Localize(R)
         W->h_written = True
         R->h_possibly_outdated = True
         return W
@@ -264,7 +268,11 @@
     def WriteBarrierFromReadReady(R):
         if R->h_written:          # fast-path
             return R
-        W = Localize(R)
+        if not R->h_global:
+            W = R
+            R = W->h_revision
+        else:
+            W = Localize(R)
         W->h_written = True
         R->h_possibly_outdated = True
         return W


More information about the pypy-commit mailing list