# HG changeset patch # User Christos Kotselidis # Date 1372085752 -7200 # Node ID 499f21a3bb8141111a86d1b9f03e52beaf895e66 # Parent 97aa9042965f960827641eaad242a96a61197f70 Replace readObject with unsafe load for G1 Barriers + Compressed Oops correctness diff -r 97aa9042965f -r 499f21a3bb81 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java Mon Jun 24 15:26:43 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java Mon Jun 24 16:55:52 2013 +0200 @@ -111,7 +111,7 @@ // If the previous value has to be loaded (before the write), the load is issued. // The load is always issued except the cases of CAS and referent field. if (doLoad) { - previousOop = (Word) Word.fromObject(field.readObject(0)); + previousOop = (Word) Word.fromObject(UnsafeLoadNode.load(field, 0, 0, Kind.Object)); } // If the previous value is null the barrier should not be issued. if (previousOop.notEqual(0)) {