[pypy-commit] pypy stmgc-c4: Disable use of immutable read barriers in most cases. Since there can be a
Raemi
noreply at buildbot.pypy.org
Thu Nov 7 12:08:38 CET 2013
Author: Remi Meier <remi.meier at gmail.com>
Branch: stmgc-c4
Changeset: r67873:5f1727595de0
Date: 2013-11-07 12:07 +0100
http://bitbucket.org/pypy/pypy/changeset/5f1727595de0/
Log: Disable use of immutable read barriers in most cases. Since there
can be a transaction break between allocation and initialization of
the immutable field...
diff --git a/rpython/jit/backend/llsupport/stmrewrite.py b/rpython/jit/backend/llsupport/stmrewrite.py
--- a/rpython/jit/backend/llsupport/stmrewrite.py
+++ b/rpython/jit/backend/llsupport/stmrewrite.py
@@ -271,18 +271,19 @@
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)
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
@@ -85,8 +85,8 @@
# 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.
More information about the pypy-commit
mailing list