changeset 16122:466211b0f8ae

Merge.
author Doug Simon <doug.simon@oracle.com>
date Tue, 17 Jun 2014 16:49:21 +0200
parents 4b1c42d33929 (current diff) 5cbaad0b7387 (diff)
children 5fa2e2f73fa6
files
diffstat 6 files changed, 13 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/CheckGraalInvariants.java	Tue Jun 17 16:48:26 2014 +0200
+++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/CheckGraalInvariants.java	Tue Jun 17 16:49:21 2014 +0200
@@ -174,6 +174,7 @@
         new VerifyUsageWithEquals(JavaType.class).apply(graph, context);
         new VerifyUsageWithEquals(JavaMethod.class).apply(graph, context);
         new VerifyUsageWithEquals(JavaField.class).apply(graph, context);
+        new VerifyUsageWithEquals(LIRKind.class).apply(graph, context);
         new VerifyDebugUsage().apply(graph, context);
     }
 
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java	Tue Jun 17 16:48:26 2014 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java	Tue Jun 17 16:49:21 2014 +0200
@@ -533,7 +533,7 @@
     void assignLocation(AllocatableValue newLocation) {
         if (isRegister(newLocation)) {
             assert this.location == null : "cannot re-assign location for " + this;
-            if (newLocation.getLIRKind() == LIRKind.Illegal && kind != LIRKind.Illegal) {
+            if (newLocation.getLIRKind().equals(LIRKind.Illegal) && !kind.equals(LIRKind.Illegal)) {
                 this.location = asRegister(newLocation).asValue(kind);
                 return;
             }
@@ -542,7 +542,7 @@
         } else {
             assert this.location == null || isRegister(this.location) : "cannot re-assign location for " + this;
             assert isStackSlot(newLocation);
-            assert newLocation.getLIRKind() != LIRKind.Illegal;
+            assert !newLocation.getLIRKind().equals(LIRKind.Illegal);
             assert newLocation.getLIRKind().equals(this.kind);
         }
         this.location = newLocation;
@@ -562,7 +562,7 @@
     }
 
     void setKind(LIRKind kind) {
-        assert isRegister(operand) || this.kind() == LIRKind.Illegal || this.kind() == kind : "overwriting existing type";
+        assert isRegister(operand) || this.kind().equals(LIRKind.Illegal) || this.kind().equals(kind) : "overwriting existing type";
         this.kind = kind;
     }
 
@@ -774,7 +774,7 @@
                 Interval i1 = splitChildren.get(i);
 
                 assert i1.splitParent() == this : "not a split child of this interval";
-                assert i1.kind() == kind() : "must be equal for all split children";
+                assert i1.kind().equals(kind()) : "must be equal for all split children";
                 assert (i1.spillSlot() == null && spillSlot == null) || i1.spillSlot().equals(spillSlot()) : "must be equal for all split children";
 
                 for (int j = i + 1; j < splitChildren.size(); j++) {
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java	Tue Jun 17 16:48:26 2014 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java	Tue Jun 17 16:49:21 2014 +0200
@@ -965,7 +965,7 @@
         }
 
         Interval interval = getOrCreateInterval(operand);
-        if (kind != LIRKind.Illegal) {
+        if (!kind.equals(LIRKind.Illegal)) {
             interval.setKind(kind);
         }
 
@@ -983,7 +983,7 @@
         }
 
         Interval interval = getOrCreateInterval(operand);
-        if (kind != LIRKind.Illegal) {
+        if (!kind.equals(LIRKind.Illegal)) {
             interval.setKind(kind);
         }
 
@@ -1005,7 +1005,7 @@
         int defPos = op.id();
 
         Interval interval = getOrCreateInterval(operand);
-        if (kind != LIRKind.Illegal) {
+        if (!kind.equals(LIRKind.Illegal)) {
             interval.setKind(kind);
         }
 
@@ -1918,7 +1918,7 @@
                     throw new GraalInternalError("");
                 }
 
-                if (isVariable(i1.operand) && i1.kind() == LIRKind.Illegal) {
+                if (isVariable(i1.operand) && i1.kind().equals(LIRKind.Illegal)) {
                     Debug.log("Interval %d has no type assigned", i1.operandNumber);
                     Debug.log(i1.logString(this));
                     throw new GraalInternalError("");
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/MoveResolver.java	Tue Jun 17 16:48:26 2014 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/MoveResolver.java	Tue Jun 17 16:49:21 2014 +0200
@@ -209,7 +209,7 @@
     }
 
     private void insertMove(Value fromOpr, Interval toInterval) {
-        assert fromOpr.getLIRKind() == toInterval.kind() : "move between different types";
+        assert fromOpr.getLIRKind().equals(toInterval.kind()) : "move between different types";
         assert insertIdx != -1 : "must setup insert position first";
 
         AllocatableValue toOpr = toInterval.operand;
@@ -339,7 +339,7 @@
         Debug.log("add move mapping from %s to %s", fromInterval, toInterval);
 
         assert !fromInterval.operand.equals(toInterval.operand) : "from and to interval equal: " + fromInterval;
-        assert fromInterval.kind() == toInterval.kind();
+        assert fromInterval.kind().equals(toInterval.kind());
         mappingFrom.add(fromInterval);
         mappingFromOpr.add(Value.ILLEGAL);
         mappingTo.add(toInterval);
--- a/graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/HSAILHotSpotLIRGenerator.java	Tue Jun 17 16:48:26 2014 +0200
+++ b/graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/HSAILHotSpotLIRGenerator.java	Tue Jun 17 16:49:21 2014 +0200
@@ -148,7 +148,7 @@
 
     public Value emitCompareAndSwap(Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue) {
         LIRKind kind = newValue.getLIRKind();
-        assert kind == expectedValue.getLIRKind();
+        assert kind.equals(expectedValue.getLIRKind());
         Kind memKind = (Kind) kind.getPlatformKind();
 
         HSAILAddressValue addressValue = asAddressValue(address);
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java	Tue Jun 17 16:48:26 2014 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java	Tue Jun 17 16:49:21 2014 +0200
@@ -285,7 +285,7 @@
         if (freedSlots != null) {
             for (Iterator<StackSlot> iter = freedSlots.iterator(); iter.hasNext();) {
                 StackSlot s = iter.next();
-                if (s.getLIRKind() == kind) {
+                if (s.getLIRKind().equals(kind)) {
                     iter.remove();
                     if (freedSlots.isEmpty()) {
                         freedSlots = null;