changeset 10522:499f21a3bb81

Replace readObject with unsafe load for G1 Barriers + Compressed Oops correctness
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Mon, 24 Jun 2013 16:55:52 +0200
parents 97aa9042965f
children 45788e918443
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)) {