Author: Armin Rigo <ar...@tunes.org>
Branch: stmgc-c4
Changeset: r65328:e5fba2018208
Date: 2013-07-11 08:25 +0200
http://bitbucket.org/pypy/pypy/changeset/e5fba2018208/

Log:    We can't leave getarraysize or the immutable getfields fully
        unmodified. We'd need at least some lightweight read barrier to
        detect stubs. For now we just put a regular read barrier.

diff --git a/rpython/translator/stm/writebarrier.py 
b/rpython/translator/stm/writebarrier.py
--- a/rpython/translator/stm/writebarrier.py
+++ b/rpython/translator/stm/writebarrier.py
@@ -71,11 +71,17 @@
         wants_a_barrier = {}
         expand_comparison = set()
         for op in block.operations:
+            # [1] XXX we can't leave getarraysize or the immutable getfields
+            #     fully unmodified.  We'd need at least some lightweight
+            #     read barrier to detect stubs.  For now we just put a
+            #     regular read barrier.
             if (op.opname in ('getfield', 'getarrayitem',
-                              'getinteriorfield') and
+                              'getinteriorfield',
+                              'getarraysize', 'getinteriorarraysize', # XXX [1]
+                              ) and
                   op.result.concretetype is not lltype.Void and
                   op.args[0].concretetype.TO._gckind == 'gc' and
-                  not is_immutable(op)):
+                  True): #not is_immutable(op)): XXX see [1]
                 wants_a_barrier.setdefault(op, 'R')
             elif (op.opname in ('setfield', 'setarrayitem',
                                 'setinteriorfield') and
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to