Author: Armin Rigo <[email protected]>
Branch: stmgc-c4
Changeset: r67154:8206090afbcb
Date: 2013-10-05 07:55 +0200
http://bitbucket.org/pypy/pypy/changeset/8206090afbcb/
Log: Actually even reads of GC pointers would need special care
diff --git a/rpython/rlib/objectmodel.py b/rpython/rlib/objectmodel.py
--- a/rpython/rlib/objectmodel.py
+++ b/rpython/rlib/objectmodel.py
@@ -798,7 +798,7 @@
# behavior is fine, like incrementing some global counter.
# XXX only for GC objects for now
# XXX but it should replace 'stm_dont_track_raw_accesses' too
-# XXX DON'T USE for *writes* of a GC pointer into an object
+# XXX only for reads and writes of non-GC pointers
stm_ignored = _StmIgnored()
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
@@ -134,6 +134,11 @@
raise Exception(
"%r: 'with stm_ignored:' contains unsupported "
"operation %r writing a GC pointer" % (graph, op))
+ if wants_a_barrier[op] == 'R' and is_getter and (
+ is_gc_ptr(op.result.concretetype)):
+ raise Exception(
+ "%r: 'with stm_ignored:' contains unsupported "
+ "operation %r reading a GC pointer" % (graph, op))
assert 'I' <= wants_a_barrier[op] < 'W'
wants_a_barrier[op] = 'I'
#
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit