Armin Rigo committed ffe7dd8

Fixes: in raw_load/raw_store, we don't know what kind of type the 1st argument has. It could be a GCREF, or a Signed or an

Comments (0)

Files changed (2)


     # If it is a RAW pointer, and it is a read from a non-immutable place,
     # and it doesn't use the hint 'stm_dont_track_raw_accesses', then they
     # turn inevitable.
-    S = op.args[0].concretetype.TO
+    TYPE = op.args[0].concretetype
+    if not isinstance(TYPE, lltype.Ptr):
+        return True     # raw_load or raw_store with a number or address
+    S = TYPE.TO
     if S._gckind == 'gc':
         return False
     if is_immutable(op):


     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', 'raw_load', 'raw_store'):
+    if op.opname in ('getarrayitem', 'setarrayitem'):
         ARRAY = op.args[0].concretetype.TO
         return ARRAY._immutable_field()
     if op.opname == 'getinteriorfield':
     if op.opname == 'setinteriorfield':
         OUTER = op.args[0].concretetype.TO
         return OUTER._immutable_interiorfield(unwraplist(op.args[1:-1]))
+    if op.opname in ('raw_load', 'raw_store'):
+        return False
     raise AssertionError(op)
 def needs_barrier(frm, to):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.