changeset 10946:0d6d064cd80c

Always use precise barriers when type==null
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Fri, 02 Aug 2013 14:34:46 +0200
parents a03d31fa01d9
children e8dac30e274d
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java	Fri Aug 02 14:26:54 2013 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java	Fri Aug 02 14:34:46 2013 +0200
@@ -903,10 +903,10 @@
         BarrierType barrierType = BarrierType.NONE;
         if (store.value().kind() == Kind.Object) {
             ResolvedJavaType type = store.object().objectStamp().type();
-            if (type != null && type.isArray()) {
+            if (type != null && !type.isArray()) {
+                barrierType = BarrierType.IMPRECISE;
+            } else {
                 barrierType = BarrierType.PRECISE;
-            } else {
-                barrierType = BarrierType.IMPRECISE;
             }
         }
         return barrierType;
@@ -916,10 +916,10 @@
         BarrierType barrierType = BarrierType.NONE;
         if (cas.expected().kind() == Kind.Object) {
             ResolvedJavaType type = cas.object().objectStamp().type();
-            if (type != null && type.isArray()) {
+            if (type != null && !type.isArray()) {
+                barrierType = BarrierType.IMPRECISE;
+            } else {
                 barrierType = BarrierType.PRECISE;
-            } else {
-                barrierType = BarrierType.IMPRECISE;
             }
         }
         return barrierType;