Mercurial > hg > graal-compiler
diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolvedImpl.java @ 5466:af07e798947d
lifted fast subtype check into checkcast snippets
introduced ExplodeLoopNode for use in snippets to denote a loop that must be completely unrolled
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 01 Jun 2012 11:10:49 +0200 |
parents | a53162ca8219 |
children | d89b20486d87 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolvedImpl.java Fri Jun 01 11:08:44 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolvedImpl.java Fri Jun 01 11:10:49 2012 +0200 @@ -26,6 +26,7 @@ import java.lang.reflect.*; import java.util.*; +import com.oracle.graal.hotspot.*; import com.oracle.max.cri.ci.*; import com.oracle.max.cri.ri.*; @@ -42,6 +43,7 @@ private boolean hasFinalizer; private boolean hasSubclass; private boolean hasFinalizableSubclass; + private int superCheckOffset; private boolean isArrayClass; private boolean isInstanceClass; private boolean isInterface; @@ -264,7 +266,7 @@ return this; } - // (dnsimon) this value may require identity semantics + // this value may require identity semantics so cache it private HotSpotKlassOop klassOopCache; @Override @@ -274,4 +276,14 @@ } return klassOopCache; } + + private static final int SECONDARY_SUPER_CACHE_OFFSET = CompilerImpl.getInstance().getConfig().secondarySuperCacheOffset; + + public boolean isPrimaryType() { + return SECONDARY_SUPER_CACHE_OFFSET != superCheckOffset; + } + + public int superCheckOffset() { + return superCheckOffset; + } }