# HG changeset patch # User Thomas Wuerthinger # Date 1426331666 -3600 # Node ID e532af44f9f97c7d682d39038c2f3b3fa0a72e56 # Parent e17f04731c61f689f27658b47aa3e581909b8ec1 Fix WriteBarrierAdditionTest. diff -r e17f04731c61 -r e532af44f9f9 graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierVerificationTest.java --- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierVerificationTest.java Sat Mar 14 02:04:40 2015 +0100 +++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierVerificationTest.java Sat Mar 14 12:14:26 2015 +0100 @@ -657,15 +657,13 @@ if (node instanceof WriteNode) { WriteNode write = (WriteNode) node; LocationIdentity obj = write.getLocationIdentity(); - if (obj instanceof ResolvedJavaField) { - if (((ResolvedJavaField) obj).getName().equals("barrierIndex")) { - /* - * A "barrierIndex" variable was found and is checked against the - * input barrier array. - */ - if (eliminateBarrier(write.value().asJavaConstant().asInt(), removedBarrierIndices)) { - return true; - } + if (obj.toString().equals("barrierIndex")) { + /* + * A "barrierIndex" variable was found and is checked against the input + * barrier array. + */ + if (eliminateBarrier(write.value().asJavaConstant().asInt(), removedBarrierIndices)) { + return true; } } } else if (node instanceof SerialWriteBarrier || node instanceof G1PostWriteBarrier) { diff -r e17f04731c61 -r e532af44f9f9 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaFieldImpl.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaFieldImpl.java Sat Mar 14 02:04:40 2015 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaFieldImpl.java Sat Mar 14 12:14:26 2015 +0100 @@ -75,6 +75,11 @@ public int hashCode() { return inner.hashCode(); } + + @Override + public String toString() { + return inner.name; + } } public HotSpotResolvedJavaFieldImpl(HotSpotResolvedObjectTypeImpl holder, String name, JavaType type, long offset, int modifiers) {