Armin Rigo  committed 1b6f11c

Add raw_load and raw_store here, to generate the correct barriers
when applied on GC objects.

  • Participants
  • Parent commits 781dce1
  • Branches stmgc-c4

Comments (0)

Files changed (2)

File rpython/translator/stm/

     if opname.startswith('stm_'):
-GETTERS = set(['getfield', 'getarrayitem', 'getinteriorfield'])
-SETTERS = set(['setfield', 'setarrayitem', 'setinteriorfield'])
+GETTERS = set(['getfield', 'getarrayitem', 'getinteriorfield', 'raw_load'])
+SETTERS = set(['setfield', 'setarrayitem', 'setinteriorfield', 'raw_store'])
 MALLOCS = set(['malloc', 'malloc_varsize',
                'malloc_nonmovable', 'malloc_nonmovable_varsize'])
 # ____________________________________________________________

File rpython/translator/stm/

     if op.opname in ('getfield', 'setfield'):
         STRUCT = op.args[0].concretetype.TO
         return STRUCT._immutable_field(op.args[1].value)
-    if op.opname in ('getarrayitem', 'setarrayitem'):
+    if op.opname in ('getarrayitem', 'setarrayitem', 'raw_load', 'raw_store'):
         ARRAY = op.args[0].concretetype.TO
         return ARRAY._immutable_field()
     if op.opname == 'getinteriorfield':
         expand_comparison = set()
         for op in self.block.operations:
             is_getter = (op.opname in ('getfield', 'getarrayitem',
-                                       'getinteriorfield') and
+                                       'getinteriorfield', 'raw_load') and
                          op.result.concretetype is not lltype.Void and
                 wants_a_barrier[op] = 'R'
             elif (op.opname in ('setfield', 'setarrayitem',
-                                'setinteriorfield') and
+                                'setinteriorfield', 'raw_store') and
                   op.args[-1].concretetype is not lltype.Void and
                 # setfields need a regular write barrier