changeset 17361:6b1eed55ea66

Merge.
author Doug Simon <doug.simon@oracle.com>
date Tue, 07 Oct 2014 13:46:29 +0200
parents d044ca4a1cdc (current diff) bf84afcd4b40 (diff)
children 03eef43d364f
files
diffstat 3 files changed, 16 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- 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);
     }
 
--- 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<OperandFlag>[] 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<ValueFieldInfo> fields) {
+        public Values(int directCount, ArrayList<ValueFieldInfo> 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<OperandFlag> getFlags(int i) {
             return flags[i];
         }
@@ -98,9 +92,6 @@
 
         @Override
         public String toString() {
-            if (mode != null) {
-                return super.toString() + ":" + mode;
-            }
             return super.toString();
         }
     }
--- 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;
     }