[pypy-commit] pypy stmgc-c4: We can't leave getarraysize or the immutable getfields

arigo noreply at buildbot.pypy.org
Thu Jul 11 09:01:04 CEST 2013


Author: Armin Rigo <arigo at 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


More information about the pypy-commit mailing list