Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/LocationIdentity.java @ 21390:f9024b74dd9e
Allow subclasses of LocationIdentity to provide immuatability information
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Thu, 14 May 2015 16:16:43 -0700 |
parents | 66d45b977e44 |
children |
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/LocationIdentity.java Thu May 14 16:14:41 2015 -0700 +++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/LocationIdentity.java Thu May 14 16:16:43 2015 -0700 @@ -54,26 +54,18 @@ */ public static final LocationIdentity ARRAY_LENGTH_LOCATION = NamedLocationIdentity.immutable("[].length"); - protected final boolean immutable; - public static LocationIdentity any() { return ANY_LOCATION; } - protected LocationIdentity(boolean immutable) { - this.immutable = immutable; - } - /** * Denotes a location is unchanging in all cases. Not that this is different than the Java * notion of final which only requires definite assignment. */ - public final boolean isImmutable() { - return immutable; - } + public abstract boolean isImmutable(); public final boolean isMutable() { - return !immutable; + return !isImmutable(); } public final boolean isAny() {