[pypy-commit] pypy stmgc-c7: remove 'weakref_deref' from stm_read-exceptions

Remi Meier noreply at buildbot.pypy.org
Fri Mar 14 17:40:50 CET 2014


Author: Remi Meier
Branch: stmgc-c7
Changeset: r69961:71769371cb0b
Date: 2014-03-14 17:41 +0100
http://bitbucket.org/pypy/pypy/changeset/71769371cb0b/

Log:	remove 'weakref_deref' from stm_read-exceptions

diff --git a/rpython/translator/stm/readbarrier.py b/rpython/translator/stm/readbarrier.py
--- a/rpython/translator/stm/readbarrier.py
+++ b/rpython/translator/stm/readbarrier.py
@@ -61,10 +61,13 @@
                 op.args[0].concretetype.TO._hints.get('typeptr')):
                 # typeptr is always immutable
                 pass
-            elif ((op.opname in ('getarraysize', 'getinteriorarraysize', 'weakref_deref') and
+            elif ((op.opname in ('getarraysize', 'getinteriorarraysize') and
                   is_gc_ptr(op.args[0].concretetype)) or
                   (is_getter and is_immutable(op))):
                 # immutable getters
+                # 'weakref_deref': kind of immutable, but the GC has to see
+                #     which transactions read from a dying weakref, so we
+                #     need the barrier nonetheless...
                 pass
             elif is_getter:
                 if not stm_ignored:


More information about the pypy-commit mailing list