[pypy-commit] pypy stmgc-c4: Fix?
arigo
noreply at buildbot.pypy.org
Sat Sep 7 20:06:37 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c4
Changeset: r66844:6db8370436ba
Date: 2013-09-07 20:06 +0200
http://bitbucket.org/pypy/pypy/changeset/6db8370436ba/
Log: Fix?
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,7 +134,7 @@
def get_category_or_null(v):
# 'v' is an original variable here, or a constant
if isinstance(v, Constant) and not v.value: # a NULL constant
- return None
+ return 'Z'
if v in renamings:
return renamings[v].category
if isinstance(v, Constant):
@@ -205,7 +205,7 @@
if op in self.expand_comparison:
cats = (get_category_or_null(op.args[0]),
get_category_or_null(op.args[1]))
- if None not in cats and (cats[0] < 'V' or cats[1] < 'V'):
+ if 'Z' not in cats and (cats[0] < 'V' or cats[1] < 'V'):
if newop.opname == 'ptr_ne':
v = varoftype(lltype.Bool)
negop = SpaceOperation('bool_not', [v],
@@ -346,6 +346,7 @@
* 'R': the read barrier was applied
* 'V': same as W, except needs a repeat_write_barrier
* 'W': the write barrier was applied
+ * 'Z': the null constant
The letters are chosen so that a barrier is needed to change a
pointer from category x to category y if and only if y > x.
More information about the pypy-commit
mailing list