Mercurial > hg > truffle
changeset 10833:079513fc609e
Rename isInitialized to isInitialization (inverting semantics!).
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Mon, 22 Jul 2013 10:54:43 +0200 |
parents | 623accae20d1 |
children | 45ca31374e9f |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/WriteBarrierAdditionPhase.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/UnsafeArrayCopyNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ArrayRangeWriteNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/WriteNode.java graal/com.oracle.graal.word/src/com/oracle/graal/word/phases/WordTypeRewriterPhase.java |
diffstat | 5 files changed, 18 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/WriteBarrierAdditionPhase.java Mon Jul 22 10:46:26 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/WriteBarrierAdditionPhase.java Mon Jul 22 10:54:43 2013 +0200 @@ -67,7 +67,7 @@ BarrierType barrierType = node.getBarrierType(); if (barrierType == BarrierType.PRECISE) { if (useG1GC()) { - if (node.isInitialized()) { + if (!node.isInitialization()) { G1PreWriteBarrier preBarrier = graph.add(new G1PreWriteBarrier(node.object(), null, node.location(), true, node.getNullCheck())); preBarrier.setDeoptimizationState(node.getDeoptimizationState()); node.setNullCheck(false); @@ -116,7 +116,7 @@ private static void addArrayRangeBarriers(ArrayRangeWriteNode node, StructuredGraph graph) { if (useG1GC()) { - if (node.isInitialized()) { + if (!node.isInitialization()) { G1ArrayRangePreWriteBarrier g1ArrayRangePreWriteBarrier = graph.add(new G1ArrayRangePreWriteBarrier(node.getArray(), node.getIndex(), node.getLength())); graph.addBeforeFixed(node, g1ArrayRangePreWriteBarrier); }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/UnsafeArrayCopyNode.java Mon Jul 22 10:46:26 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/UnsafeArrayCopyNode.java Mon Jul 22 10:54:43 2013 +0200 @@ -83,8 +83,8 @@ } @Override - public boolean isInitialized() { - return true; + public boolean isInitialization() { + return false; } public Kind getElementKind() {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ArrayRangeWriteNode.java Mon Jul 22 10:46:26 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ArrayRangeWriteNode.java Mon Jul 22 10:54:43 2013 +0200 @@ -56,8 +56,9 @@ public abstract boolean isObjectArray(); /** - * If {@link #isInitialized()} is true, the memory location contains a valid value. If - * {@link #isInitialized()} is false, the memory location is uninitialized or zero. + * Returns whether this write is the initialization of the written location. Fit it is true, the + * old value of the memory location is either uninitialized or zero. If it is false, the memory + * location is guaranteed to contain a valid value or zero. */ - public abstract boolean isInitialized(); + public abstract boolean isInitialization(); }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/WriteNode.java Mon Jul 22 10:46:26 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/WriteNode.java Mon Jul 22 10:54:43 2013 +0200 @@ -37,7 +37,7 @@ @Input private ValueNode value; @Input(notDataflow = true) private FrameState stateAfter; - private final boolean initialized; + private final boolean initialization; public FrameState stateAfter() { return stateAfter; @@ -58,21 +58,22 @@ } /** - * If {@link #isInitialized()} is true, the memory location contains a valid value. If - * {@link #isInitialized()} is false, the memory location is uninitialized or zero. + * Returns whether this write is the initialization of the written location. Fit it is true, the + * old value of the memory location is either uninitialized or zero. If it is false, the memory + * location is guaranteed to contain a valid value or zero. */ - public boolean isInitialized() { - return initialized; + public boolean isInitialization() { + return initialization; } public WriteNode(ValueNode object, ValueNode value, ValueNode location, BarrierType barrierType, boolean compressible) { - this(object, value, location, barrierType, compressible, true); + this(object, value, location, barrierType, compressible, false); } - public WriteNode(ValueNode object, ValueNode value, ValueNode location, BarrierType barrierType, boolean compressible, boolean initialized) { + public WriteNode(ValueNode object, ValueNode value, ValueNode location, BarrierType barrierType, boolean compressible, boolean initialization) { super(object, location, StampFactory.forVoid(), barrierType, compressible); this.value = value; - this.initialized = initialized; + this.initialization = initialization; } @Override
--- a/graal/com.oracle.graal.word/src/com/oracle/graal/word/phases/WordTypeRewriterPhase.java Mon Jul 22 10:46:26 2013 +0200 +++ b/graal/com.oracle.graal.word/src/com/oracle/graal/word/phases/WordTypeRewriterPhase.java Mon Jul 22 10:54:43 2013 +0200 @@ -343,7 +343,7 @@ private static ValueNode writeOp(StructuredGraph graph, ValueNode base, ValueNode value, Invoke invoke, LocationNode location, Opcode op) { assert op == Opcode.WRITE || op == Opcode.INITIALIZE; - WriteNode write = graph.add(new WriteNode(base, value, location, BarrierType.NONE, false, op == Opcode.WRITE)); + WriteNode write = graph.add(new WriteNode(base, value, location, BarrierType.NONE, false, op == Opcode.INITIALIZE)); write.setStateAfter(invoke.stateAfter()); graph.addBeforeFixed(invoke.asNode(), write); return write;