# HG changeset patch # User Christos Kotselidis # Date 1375446886 -7200 # Node ID 0d6d064cd80cb9c0e0aad47d39c061fcad918eb2 # Parent a03d31fa01d97488e5ee689247e72fc2fafb5765 Always use precise barriers when type==null diff -r a03d31fa01d9 -r 0d6d064cd80c graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java --- 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;