Author: Armin Rigo <[email protected]>
Branch: stmgc-c4
Changeset: r66868:ffe7dd8b3850
Date: 2013-09-09 18:54 +0200
http://bitbucket.org/pypy/pypy/changeset/ffe7dd8b3850/
Log: 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 Address.
diff --git a/rpython/translator/stm/inevitable.py
b/rpython/translator/stm/inevitable.py
--- a/rpython/translator/stm/inevitable.py
+++ b/rpython/translator/stm/inevitable.py
@@ -36,7 +36,10 @@
# 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):
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
@@ -23,7 +23,7 @@
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':
@@ -32,6 +32,8 @@
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):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit