# HG changeset patch # User Doug Simon # Date 1412682389 -7200 # Node ID 6b1eed55ea6639af4be619ef721a3e38b43b57a6 # Parent d044ca4a1cdc72a46d621a78340845398503e4bb# Parent bf84afcd4b40abf3bad429231ee896bb169c30c2 Merge. diff -r d044ca4a1cdc -r 6b1eed55ea66 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstruction.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstruction.java Tue Oct 07 13:21:57 2014 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstruction.java Tue Oct 07 13:46:29 2014 +0200 @@ -226,11 +226,11 @@ instructionClass.forEachAlivePos(this, proc); } - public final void forEachTemp(ValuePositionProcedure proc) { + public final void forEachTempPos(ValuePositionProcedure proc) { instructionClass.forEachTempPos(this, proc); } - public final void forEachOutput(ValuePositionProcedure proc) { + public final void forEachOutputPos(ValuePositionProcedure proc) { instructionClass.forEachDefPos(this, proc); } diff -r d044ca4a1cdc -r 6b1eed55ea66 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRIntrospection.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRIntrospection.java Tue Oct 07 13:21:57 2014 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRIntrospection.java Tue Oct 07 13:46:29 2014 +0200 @@ -50,17 +50,15 @@ protected static class Values extends Fields { private final int directCount; - private final OperandMode mode; private final EnumSet[] flags; public Values(OperandModeAnnotation mode) { - this(mode.directCount, null, mode.values); + this(mode.directCount, mode.values); } @SuppressWarnings("unchecked") - public Values(int directCount, OperandMode mode, ArrayList fields) { + public Values(int directCount, ArrayList fields) { super(fields); - this.mode = mode; this.directCount = directCount; flags = new EnumSet[fields.size()]; for (int i = 0; i < fields.size(); i++) { @@ -72,10 +70,6 @@ return directCount; } - public OperandMode getMode() { - return mode; - } - public EnumSet getFlags(int i) { return flags[i]; } @@ -98,9 +92,6 @@ @Override public String toString() { - if (mode != null) { - return super.toString() + ":" + mode; - } return super.toString(); } } diff -r d044ca4a1cdc -r 6b1eed55ea66 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ValuePosition.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ValuePosition.java Tue Oct 07 13:21:57 2014 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ValuePosition.java Tue Oct 07 13:46:29 2014 +0200 @@ -136,10 +136,11 @@ @Override public String toString() { - if (outerPosition == ROOT_VALUE_POSITION) { - return values.getMode() + "(" + index + (subIndex < 0 ? "" : "/" + subIndex) + ")"; + String str = "(" + index + (subIndex < 0 ? "" : "/" + subIndex) + ")"; + if (isCompositePosition()) { + return outerPosition.toString() + "[" + str + "]"; } - return outerPosition.toString() + "[" + values.getMode() + "(" + index + (subIndex < 0 ? "" : "/" + subIndex) + ")]"; + return str; } @Override @@ -147,9 +148,9 @@ final int prime = 31; int result = 1; result = prime * result + index; - result = prime * result + ((values.getMode() == null) ? 0 : values.getMode().hashCode()); result = prime * result + subIndex; result = prime * result + ((outerPosition == null) ? 0 : outerPosition.hashCode()); + result = prime * result + ((values == null) ? 0 : values.hashCode()); return result; } @@ -168,9 +169,6 @@ if (index != other.index) { return false; } - if (values.getMode() != other.values.getMode()) { - return false; - } if (subIndex != other.subIndex) { return false; } @@ -181,6 +179,13 @@ } else if (!outerPosition.equals(other.outerPosition)) { return false; } + if (values == null) { + if (other.values != null) { + return false; + } + } else if (!values.equals(other.values)) { + return false; + } return true; }