Commits

Remi Meier committed 5f17275

Disable use of immutable read barriers in most cases. Since there can be a
transaction break between allocation and initialization of the immutable
field...

Comments (0)

Files changed (2)

rpython/jit/backend/llsupport/stmrewrite.py

         opnum = op.getopnum()
         descr = op.getdescr()
         target_category = 'R'
-        if opnum == rop.GETFIELD_GC:
-            assert isinstance(descr, FieldDescr)
-            if descr.is_immutable():
-                target_category = 'I'
-        elif opnum == rop.GETINTERIORFIELD_GC:
-            assert isinstance(descr, InteriorFieldDescr)
-            if descr.is_immutable():
-                target_category = 'I'
-        elif opnum == rop.GETARRAYITEM_GC:
-            assert isinstance(descr, ArrayDescr)
-            if descr.is_immutable():
-                target_category = 'I'
+        # XXX: review:
+        # if opnum == rop.GETFIELD_GC:
+        #     assert isinstance(descr, FieldDescr)
+        #     if descr.is_immutable():
+        #         target_category = 'I'
+        # elif opnum == rop.GETINTERIORFIELD_GC:
+        #     assert isinstance(descr, InteriorFieldDescr)
+        #     if descr.is_immutable():
+        #         target_category = 'I'
+        # elif opnum == rop.GETARRAYITEM_GC:
+        #     assert isinstance(descr, ArrayDescr)
+        #     if descr.is_immutable():
+        #         target_category = 'I'
                 
         self.handle_category_operations(op, target_category)
 

rpython/translator/stm/writebarrier.py

                 # field even on a stub
                 pass
 
-            elif (op.opname in ('getarraysize', 'getinteriorarraysize')
-                or (is_getter and is_immutable(op))):
+            elif op.opname in ('getarraysize', 'getinteriorarraysize'):
+                # XXX: or (is_getter and is_immutable(op))):
                 # we can't leave getarraysize or the immutable getfields
                 # fully unmodified: we need at least immut_read_barrier
                 # to detect stubs.