# HG changeset patch # User Tom Rodriguez # Date 1415403998 28800 # Node ID 85f5227a7a37268d92250f871924deae676f5248 # Parent 229dc0d72f2f5efc71b15053854dd4aa9f9dc579 add mutable/immutable factory methods to NamedLocationIdentity diff -r 229dc0d72f2f -r 85f5227a7a37 graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/LocationIdentity.java --- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/LocationIdentity.java Fri Nov 07 09:44:15 2014 -0800 +++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/LocationIdentity.java Fri Nov 07 15:46:38 2014 -0800 @@ -34,17 +34,17 @@ * analysis of memory accesses. A read from this location cannot be moved or coalesced with * other reads because its interaction with other reads is not known. */ - LocationIdentity ANY_LOCATION = NamedLocationIdentity.create("ANY_LOCATION", false); + LocationIdentity ANY_LOCATION = NamedLocationIdentity.mutable("ANY_LOCATION"); /** * Denotes the location of a value that is guaranteed to be unchanging. */ - LocationIdentity FINAL_LOCATION = NamedLocationIdentity.create("FINAL_LOCATION", true); + LocationIdentity FINAL_LOCATION = NamedLocationIdentity.immutable("FINAL_LOCATION"); /** * Denotes the location of the length field of a Java array. */ - LocationIdentity ARRAY_LENGTH_LOCATION = NamedLocationIdentity.create("[].length", true); + LocationIdentity ARRAY_LENGTH_LOCATION = NamedLocationIdentity.immutable("[].length"); /** * Denotes a location is unchanging in all cases. Not that this is different than the Java diff -r 229dc0d72f2f -r 85f5227a7a37 graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/NamedLocationIdentity.java --- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/NamedLocationIdentity.java Fri Nov 07 09:44:15 2014 -0800 +++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/NamedLocationIdentity.java Fri Nov 07 15:46:38 2014 -0800 @@ -59,20 +59,33 @@ } /** - * Creates a named unique location identity for read and write operations. + * Creates a named unique location identity for read and write operations against mutable + * memory. * * @param name the name of the new location identity */ - public static NamedLocationIdentity create(String name) { + public static NamedLocationIdentity mutable(String name) { return create(name, false); } /** + * Creates a named unique location identity for read operations against immutable memory. + * Immutable memory will never have a visible write in the graph, which is more restictive than + * Java final. + * + * @param name the name of the new location identity + */ + public static NamedLocationIdentity immutable(String name) { + return create(name, true); + } + + /** * Creates a named unique location identity for read and write operations. * * @param name the name of the new location identity + * @param immutable true if the location is immutable */ - public static NamedLocationIdentity create(String name, boolean immutable) { + private static NamedLocationIdentity create(String name, boolean immutable) { return DB.register(new NamedLocationIdentity(name, immutable)); } @@ -123,7 +136,7 @@ private static EnumMap initArrayLocations() { EnumMap result = new EnumMap<>(Kind.class); for (Kind kind : Kind.values()) { - result.put(kind, NamedLocationIdentity.create("Array: " + kind.getJavaName())); + result.put(kind, NamedLocationIdentity.mutable("Array: " + kind.getJavaName())); } return result; } diff -r 229dc0d72f2f -r 85f5227a7a37 graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/replacements/HSAILHotSpotReplacementsUtil.java --- a/graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/replacements/HSAILHotSpotReplacementsUtil.java Fri Nov 07 09:44:15 2014 -0800 +++ b/graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/replacements/HSAILHotSpotReplacementsUtil.java Fri Nov 07 15:46:38 2014 -0800 @@ -43,18 +43,18 @@ hsailRegisters = registers; } - public static final LocationIdentity TLAB_INFO_LOCATION = NamedLocationIdentity.create("TlabInfo"); - public static final LocationIdentity TLABINFO_LASTGOODTOP_LOCATION = NamedLocationIdentity.create("TlabInfoLastGoodTop"); - public static final LocationIdentity TLABINFO_END_LOCATION = NamedLocationIdentity.create("TlabInfoEnd"); - public static final LocationIdentity TLABINFO_TOP_LOCATION = NamedLocationIdentity.create("TlabInfoTop"); - public static final LocationIdentity TLABINFO_START_LOCATION = NamedLocationIdentity.create("TlabInfoStart"); - public static final LocationIdentity TLABINFO_ALLOCINFO_LOCATION = NamedLocationIdentity.create("TlabInfoAllocInfo"); - public static final LocationIdentity TLABINFO_ORIGINALTOP_LOCATION = NamedLocationIdentity.create("TlabInfoOriginalTop"); - public static final LocationIdentity TLABINFO_TLAB_LOCATION = NamedLocationIdentity.create("TlabInfoTlab"); + public static final LocationIdentity TLAB_INFO_LOCATION = NamedLocationIdentity.mutable("TlabInfo"); + public static final LocationIdentity TLABINFO_LASTGOODTOP_LOCATION = NamedLocationIdentity.mutable("TlabInfoLastGoodTop"); + public static final LocationIdentity TLABINFO_END_LOCATION = NamedLocationIdentity.mutable("TlabInfoEnd"); + public static final LocationIdentity TLABINFO_TOP_LOCATION = NamedLocationIdentity.mutable("TlabInfoTop"); + public static final LocationIdentity TLABINFO_START_LOCATION = NamedLocationIdentity.mutable("TlabInfoStart"); + public static final LocationIdentity TLABINFO_ALLOCINFO_LOCATION = NamedLocationIdentity.mutable("TlabInfoAllocInfo"); + public static final LocationIdentity TLABINFO_ORIGINALTOP_LOCATION = NamedLocationIdentity.mutable("TlabInfoOriginalTop"); + public static final LocationIdentity TLABINFO_TLAB_LOCATION = NamedLocationIdentity.mutable("TlabInfoTlab"); - public static final LocationIdentity ALLOCINFO_TLABINFOSPOOLNEXT_LOCATION = NamedLocationIdentity.create("AllocInfoTlabInfosPoolNext"); - public static final LocationIdentity ALLOCINFO_TLABINFOSPOOLEND_LOCATION = NamedLocationIdentity.create("AllocInfoTlabInfosPoolEnd"); - public static final LocationIdentity ALLOCINFO_TLABALIGNRESERVEBYTES_LOCATION = NamedLocationIdentity.create("AllocInfoTlabAlignreservebytes"); + public static final LocationIdentity ALLOCINFO_TLABINFOSPOOLNEXT_LOCATION = NamedLocationIdentity.mutable("AllocInfoTlabInfosPoolNext"); + public static final LocationIdentity ALLOCINFO_TLABINFOSPOOLEND_LOCATION = NamedLocationIdentity.mutable("AllocInfoTlabInfosPoolEnd"); + public static final LocationIdentity ALLOCINFO_TLABALIGNRESERVEBYTES_LOCATION = NamedLocationIdentity.mutable("AllocInfoTlabAlignreservebytes"); /** * Gets the value of the thread register as a Word. There is a level of indirection here. Thread diff -r 229dc0d72f2f -r 85f5227a7a37 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotReplacementsUtil.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotReplacementsUtil.java Fri Nov 07 09:44:15 2014 -0800 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotReplacementsUtil.java Fri Nov 07 15:46:38 2014 -0800 @@ -63,7 +63,7 @@ return config().verifyOops; } - public static final LocationIdentity EXCEPTION_OOP_LOCATION = NamedLocationIdentity.create("ExceptionOop"); + public static final LocationIdentity EXCEPTION_OOP_LOCATION = NamedLocationIdentity.mutable("ExceptionOop"); /** * @see HotSpotVMConfig#threadExceptionOopOffset @@ -73,49 +73,49 @@ return config().threadExceptionOopOffset; } - public static final LocationIdentity EXCEPTION_PC_LOCATION = NamedLocationIdentity.create("ExceptionPc"); + public static final LocationIdentity EXCEPTION_PC_LOCATION = NamedLocationIdentity.mutable("ExceptionPc"); @Fold public static int threadExceptionPcOffset() { return config().threadExceptionPcOffset; } - public static final LocationIdentity LAST_JAVA_PC_LOCATION = NamedLocationIdentity.create("LastJavaPc"); + public static final LocationIdentity LAST_JAVA_PC_LOCATION = NamedLocationIdentity.mutable("LastJavaPc"); @Fold public static int threadLastJavaPcOffset() { return config().threadLastJavaPcOffset(); } - public static final LocationIdentity LAST_JAVA_FP_LOCATION = NamedLocationIdentity.create("LastJavaFp"); + public static final LocationIdentity LAST_JAVA_FP_LOCATION = NamedLocationIdentity.mutable("LastJavaFp"); @Fold public static int threadLastJavaFpOffset() { return config().threadLastJavaFpOffset(); } - public static final LocationIdentity TLAB_TOP_LOCATION = NamedLocationIdentity.create("TlabTop"); + public static final LocationIdentity TLAB_TOP_LOCATION = NamedLocationIdentity.mutable("TlabTop"); @Fold public static int threadTlabTopOffset() { return config().threadTlabTopOffset(); } - public static final LocationIdentity TLAB_END_LOCATION = NamedLocationIdentity.create("TlabEnd"); + public static final LocationIdentity TLAB_END_LOCATION = NamedLocationIdentity.mutable("TlabEnd"); @Fold private static int threadTlabEndOffset() { return config().threadTlabEndOffset(); } - public static final LocationIdentity TLAB_START_LOCATION = NamedLocationIdentity.create("TlabStart"); + public static final LocationIdentity TLAB_START_LOCATION = NamedLocationIdentity.mutable("TlabStart"); @Fold private static int threadTlabStartOffset() { return config().threadTlabStartOffset(); } - public static final LocationIdentity PENDING_EXCEPTION_LOCATION = NamedLocationIdentity.create("PendingException"); + public static final LocationIdentity PENDING_EXCEPTION_LOCATION = NamedLocationIdentity.mutable("PendingException"); /** * @see HotSpotVMConfig#pendingExceptionOffset @@ -125,7 +125,7 @@ return config().pendingExceptionOffset; } - public static final LocationIdentity PENDING_DEOPTIMIZATION_LOCATION = NamedLocationIdentity.create("PendingDeoptimization"); + public static final LocationIdentity PENDING_DEOPTIMIZATION_LOCATION = NamedLocationIdentity.mutable("PendingDeoptimization"); /** * @see HotSpotVMConfig#pendingDeoptimizationOffset @@ -135,7 +135,7 @@ return config().pendingDeoptimizationOffset; } - public static final LocationIdentity OBJECT_RESULT_LOCATION = NamedLocationIdentity.create("ObjectResult"); + public static final LocationIdentity OBJECT_RESULT_LOCATION = NamedLocationIdentity.mutable("ObjectResult"); @Fold private static int objectResultOffset() { @@ -232,14 +232,14 @@ return result; } - public static final LocationIdentity JAVA_THREAD_THREAD_OBJECT_LOCATION = NamedLocationIdentity.create("JavaThread::_threadObj"); + public static final LocationIdentity JAVA_THREAD_THREAD_OBJECT_LOCATION = NamedLocationIdentity.mutable("JavaThread::_threadObj"); @Fold public static int threadObjectOffset() { return config().threadObjectOffset; } - public static final LocationIdentity JAVA_THREAD_OSTHREAD_LOCATION = NamedLocationIdentity.create("JavaThread::_osthread"); + public static final LocationIdentity JAVA_THREAD_OSTHREAD_LOCATION = NamedLocationIdentity.mutable("JavaThread::_osthread"); @Fold public static int osThreadOffset() { @@ -271,7 +271,7 @@ return config().heapWordSize; } - public static final LocationIdentity PROTOTYPE_MARK_WORD_LOCATION = NamedLocationIdentity.create("PrototypeMarkWord"); + public static final LocationIdentity PROTOTYPE_MARK_WORD_LOCATION = NamedLocationIdentity.mutable("PrototypeMarkWord"); @Fold public static int prototypeMarkWordOffset() { @@ -283,14 +283,14 @@ return config().arrayPrototypeMarkWord(); } - public static final LocationIdentity KLASS_ACCESS_FLAGS_LOCATION = NamedLocationIdentity.create("Klass::_access_flags", true); + public static final LocationIdentity KLASS_ACCESS_FLAGS_LOCATION = NamedLocationIdentity.immutable("Klass::_access_flags"); @Fold public static int klassAccessFlagsOffset() { return config().klassAccessFlagsOffset; } - public static final LocationIdentity KLASS_LAYOUT_HELPER_LOCATION = NamedLocationIdentity.create("Klass::_layout_helper", true); + public static final LocationIdentity KLASS_LAYOUT_HELPER_LOCATION = NamedLocationIdentity.immutable("Klass::_layout_helper"); @Fold public static int klassLayoutHelperOffset() { @@ -319,30 +319,30 @@ return (layoutHelper < layoutHelperNeutralValue); } - public static final LocationIdentity ARRAY_KLASS_COMPONENT_MIRROR = NamedLocationIdentity.create("ArrayKlass::_component_mirror", true); + public static final LocationIdentity ARRAY_KLASS_COMPONENT_MIRROR = NamedLocationIdentity.immutable("ArrayKlass::_component_mirror"); @Fold public static int arrayKlassComponentMirrorOffset() { return config().arrayKlassComponentMirrorOffset; } - public static final LocationIdentity KLASS_SUPER_KLASS_LOCATION = NamedLocationIdentity.create("Klass::_super", true); + public static final LocationIdentity KLASS_SUPER_KLASS_LOCATION = NamedLocationIdentity.immutable("Klass::_super"); @Fold public static int klassSuperKlassOffset() { return config().klassSuperKlassOffset; } - public static final LocationIdentity MARK_WORD_LOCATION = NamedLocationIdentity.create("MarkWord"); + public static final LocationIdentity MARK_WORD_LOCATION = NamedLocationIdentity.mutable("MarkWord"); @Fold public static int markOffset() { return config().markOffset; } - public static final LocationIdentity HUB_WRITE_LOCATION = NamedLocationIdentity.create("Hub:write"); + public static final LocationIdentity HUB_WRITE_LOCATION = NamedLocationIdentity.mutable("Hub:write"); - public static final LocationIdentity HUB_LOCATION = NamedLocationIdentity.create("Hub", true); + public static final LocationIdentity HUB_LOCATION = NamedLocationIdentity.immutable("Hub"); @Fold private static int hubOffset() { @@ -479,28 +479,28 @@ return config().g1SATBQueueBufferOffset(); } - public static final LocationIdentity KLASS_SUPER_CHECK_OFFSET_LOCATION = NamedLocationIdentity.create("Klass::_super_check_offset", true); + public static final LocationIdentity KLASS_SUPER_CHECK_OFFSET_LOCATION = NamedLocationIdentity.immutable("Klass::_super_check_offset"); @Fold public static int superCheckOffsetOffset() { return config().superCheckOffsetOffset; } - public static final LocationIdentity SECONDARY_SUPER_CACHE_LOCATION = NamedLocationIdentity.create("SecondarySuperCache"); + public static final LocationIdentity SECONDARY_SUPER_CACHE_LOCATION = NamedLocationIdentity.mutable("SecondarySuperCache"); @Fold public static int secondarySuperCacheOffset() { return config().secondarySuperCacheOffset; } - public static final LocationIdentity SECONDARY_SUPERS_LOCATION = NamedLocationIdentity.create("SecondarySupers"); + public static final LocationIdentity SECONDARY_SUPERS_LOCATION = NamedLocationIdentity.mutable("SecondarySupers"); @Fold public static int secondarySupersOffset() { return config().secondarySupersOffset; } - public static final LocationIdentity DISPLACED_MARK_WORD_LOCATION = NamedLocationIdentity.create("DisplacedMarkWord"); + public static final LocationIdentity DISPLACED_MARK_WORD_LOCATION = NamedLocationIdentity.mutable("DisplacedMarkWord"); @Fold public static int lockDisplacedMarkOffset() { @@ -598,7 +598,7 @@ return CodeUtil.log2(wordSize()); } - public static final LocationIdentity CLASS_STATE_LOCATION = NamedLocationIdentity.create("ClassState"); + public static final LocationIdentity CLASS_STATE_LOCATION = NamedLocationIdentity.mutable("ClassState"); @Fold public static int instanceKlassInitStateOffset() { @@ -623,7 +623,7 @@ return hub.readByte(instanceKlassInitStateOffset(), CLASS_STATE_LOCATION); } - public static final LocationIdentity KLASS_MODIFIER_FLAGS_LOCATION = NamedLocationIdentity.create("Klass::_modifier_flags", true); + public static final LocationIdentity KLASS_MODIFIER_FLAGS_LOCATION = NamedLocationIdentity.immutable("Klass::_modifier_flags"); @Fold public static int klassModifierFlagsOffset() { @@ -640,28 +640,28 @@ return config().arrayKlassOffset; } - public static final LocationIdentity KLASS_NODE_CLASS = NamedLocationIdentity.create("KlassNodeClass"); + public static final LocationIdentity KLASS_NODE_CLASS = NamedLocationIdentity.mutable("KlassNodeClass"); @Fold public static int instanceKlassNodeClassOffset() { return config().instanceKlassNodeClassOffset; } - public static final LocationIdentity CLASS_MIRROR_LOCATION = NamedLocationIdentity.create("Klass::_java_mirror", true); + public static final LocationIdentity CLASS_MIRROR_LOCATION = NamedLocationIdentity.immutable("Klass::_java_mirror"); @Fold public static int classMirrorOffset() { return config().classMirrorOffset; } - public static final LocationIdentity HEAP_TOP_LOCATION = NamedLocationIdentity.create("HeapTop"); + public static final LocationIdentity HEAP_TOP_LOCATION = NamedLocationIdentity.mutable("HeapTop"); @Fold public static long heapTopAddress() { return config().heapTopAddress; } - public static final LocationIdentity HEAP_END_LOCATION = NamedLocationIdentity.create("HeapEnd"); + public static final LocationIdentity HEAP_END_LOCATION = NamedLocationIdentity.mutable("HeapEnd"); @Fold public static long heapEndAddress() { @@ -683,42 +683,42 @@ return config().tlabAlignmentReserve; } - public static final LocationIdentity TLAB_SIZE_LOCATION = NamedLocationIdentity.create("TlabSize"); + public static final LocationIdentity TLAB_SIZE_LOCATION = NamedLocationIdentity.mutable("TlabSize"); @Fold public static int threadTlabSizeOffset() { return config().threadTlabSizeOffset(); } - public static final LocationIdentity TLAB_THREAD_ALLOCATED_BYTES_LOCATION = NamedLocationIdentity.create("TlabThreadAllocatedBytes"); + public static final LocationIdentity TLAB_THREAD_ALLOCATED_BYTES_LOCATION = NamedLocationIdentity.mutable("TlabThreadAllocatedBytes"); @Fold public static int threadAllocatedBytesOffset() { return config().threadAllocatedBytesOffset; } - public static final LocationIdentity TLAB_REFILL_WASTE_LIMIT_LOCATION = NamedLocationIdentity.create("RefillWasteLimit"); + public static final LocationIdentity TLAB_REFILL_WASTE_LIMIT_LOCATION = NamedLocationIdentity.mutable("RefillWasteLimit"); @Fold public static int tlabRefillWasteLimitOffset() { return config().tlabRefillWasteLimitOffset(); } - public static final LocationIdentity TLAB_NOF_REFILLS_LOCATION = NamedLocationIdentity.create("TlabNOfRefills"); + public static final LocationIdentity TLAB_NOF_REFILLS_LOCATION = NamedLocationIdentity.mutable("TlabNOfRefills"); @Fold public static int tlabNumberOfRefillsOffset() { return config().tlabNumberOfRefillsOffset(); } - public static final LocationIdentity TLAB_FAST_REFILL_WASTE_LOCATION = NamedLocationIdentity.create("TlabFastRefillWaste"); + public static final LocationIdentity TLAB_FAST_REFILL_WASTE_LOCATION = NamedLocationIdentity.mutable("TlabFastRefillWaste"); @Fold public static int tlabFastRefillWasteOffset() { return config().tlabFastRefillWasteOffset(); } - public static final LocationIdentity TLAB_SLOW_ALLOCATIONS_LOCATION = NamedLocationIdentity.create("TlabSlowAllocations"); + public static final LocationIdentity TLAB_SLOW_ALLOCATIONS_LOCATION = NamedLocationIdentity.mutable("TlabSlowAllocations"); @Fold public static int tlabSlowAllocationsOffset() { @@ -818,11 +818,11 @@ } } - public static final LocationIdentity OBJ_ARRAY_KLASS_ELEMENT_KLASS_LOCATION = NamedLocationIdentity.create("ObjArrayKlass::_element_klass", true); + public static final LocationIdentity OBJ_ARRAY_KLASS_ELEMENT_KLASS_LOCATION = NamedLocationIdentity.immutable("ObjArrayKlass::_element_klass"); - public static final LocationIdentity PRIMARY_SUPERS_LOCATION = NamedLocationIdentity.create("PrimarySupers", true); + public static final LocationIdentity PRIMARY_SUPERS_LOCATION = NamedLocationIdentity.immutable("PrimarySupers"); - public static final LocationIdentity METASPACE_ARRAY_LENGTH_LOCATION = NamedLocationIdentity.create("MetaspaceArrayLength", true); + public static final LocationIdentity METASPACE_ARRAY_LENGTH_LOCATION = NamedLocationIdentity.immutable("MetaspaceArrayLength"); - public static final LocationIdentity SECONDARY_SUPERS_ELEMENT_LOCATION = NamedLocationIdentity.create("SecondarySupersElement", true); + public static final LocationIdentity SECONDARY_SUPERS_ELEMENT_LOCATION = NamedLocationIdentity.immutable("SecondarySupersElement"); } diff -r 229dc0d72f2f -r 85f5227a7a37 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MonitorSnippets.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MonitorSnippets.java Fri Nov 07 09:44:15 2014 -0800 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MonitorSnippets.java Fri Nov 07 15:46:38 2014 -0800 @@ -369,7 +369,7 @@ */ private static final boolean ENABLE_BREAKPOINT = false; - private static final LocationIdentity MONITOR_COUNTER_LOCATION = NamedLocationIdentity.create("MonitorCounter"); + private static final LocationIdentity MONITOR_COUNTER_LOCATION = NamedLocationIdentity.mutable("MonitorCounter"); @NodeIntrinsic(BreakpointNode.class) static native void bkpt(Object object, Word mark, Word tmp, Word value); diff -r 229dc0d72f2f -r 85f5227a7a37 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java Fri Nov 07 09:44:15 2014 -0800 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java Fri Nov 07 15:46:38 2014 -0800 @@ -62,7 +62,7 @@ */ public class NewObjectSnippets implements Snippets { - public static final LocationIdentity INIT_LOCATION = NamedLocationIdentity.create("Initialization"); + public static final LocationIdentity INIT_LOCATION = NamedLocationIdentity.mutable("Initialization"); static class Options { diff -r 229dc0d72f2f -r 85f5227a7a37 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java Fri Nov 07 09:44:15 2014 -0800 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java Fri Nov 07 15:46:38 2014 -0800 @@ -63,9 +63,9 @@ "Number of effective G1 Post Write Barriers (after passing the NULL test)"); private static final SnippetCounter g1ExecutedPostWriteBarrierCounter = new SnippetCounter(countersWriteBarriers, "g1ExecutedPostWriteBarrier", "Number of executed G1 Post Write Barriers"); - public static final LocationIdentity GC_CARD_LOCATION = NamedLocationIdentity.create("GC-Card"); - public static final LocationIdentity GC_LOG_LOCATION = NamedLocationIdentity.create("GC-Log"); - public static final LocationIdentity GC_INDEX_LOCATION = NamedLocationIdentity.create("GC-Index"); + public static final LocationIdentity GC_CARD_LOCATION = NamedLocationIdentity.mutable("GC-Card"); + public static final LocationIdentity GC_LOG_LOCATION = NamedLocationIdentity.mutable("GC-Log"); + public static final LocationIdentity GC_INDEX_LOCATION = NamedLocationIdentity.mutable("GC-Index"); @Snippet public static void serialWriteBarrier(Object object, Object location, @ConstantParameter boolean usePrecise) { diff -r 229dc0d72f2f -r 85f5227a7a37 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/UncommonTrapStub.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/UncommonTrapStub.java Fri Nov 07 09:44:15 2014 -0800 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/UncommonTrapStub.java Fri Nov 07 15:46:38 2014 -0800 @@ -78,7 +78,7 @@ */ public class UncommonTrapStub extends SnippetStub { - public static final LocationIdentity STACK_BANG_LOCATION = NamedLocationIdentity.create("stack bang"); + public static final LocationIdentity STACK_BANG_LOCATION = NamedLocationIdentity.mutable("stack bang"); private final TargetDescription target; diff -r 229dc0d72f2f -r 85f5227a7a37 graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/ObjectAccessTest.java --- a/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/ObjectAccessTest.java Fri Nov 07 09:44:15 2014 -0800 +++ b/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/ObjectAccessTest.java Fri Nov 07 15:46:38 2014 -0800 @@ -40,7 +40,7 @@ */ public class ObjectAccessTest extends GraalCompilerTest implements Snippets { - private static final LocationIdentity ID = NamedLocationIdentity.create("ObjectAccessTestID"); + private static final LocationIdentity ID = NamedLocationIdentity.mutable("ObjectAccessTestID"); private static final Kind[] KINDS = new Kind[]{Kind.Byte, Kind.Char, Kind.Short, Kind.Int, Kind.Long, Kind.Float, Kind.Double, Kind.Object}; private final ReplacementsImpl installer; diff -r 229dc0d72f2f -r 85f5227a7a37 graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/PointerTest.java --- a/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/PointerTest.java Fri Nov 07 09:44:15 2014 -0800 +++ b/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/PointerTest.java Fri Nov 07 15:46:38 2014 -0800 @@ -44,7 +44,7 @@ */ public class PointerTest extends GraalCompilerTest implements Snippets { - private static final LocationIdentity ID = NamedLocationIdentity.create("ID"); + private static final LocationIdentity ID = NamedLocationIdentity.mutable("ID"); private static final Kind[] KINDS = new Kind[]{Kind.Byte, Kind.Char, Kind.Short, Kind.Int, Kind.Long, Kind.Float, Kind.Double, Kind.Object}; private final TargetDescription target; private final ReplacementsImpl installer; diff -r 229dc0d72f2f -r 85f5227a7a37 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetCounter.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetCounter.java Fri Nov 07 09:44:15 2014 -0800 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetCounter.java Fri Nov 07 15:46:38 2014 -0800 @@ -132,7 +132,7 @@ * usage in snippets is always possible. If a method accesses the counter via the field and the * snippet, the result might not be correct though. */ - protected static final LocationIdentity SNIPPET_COUNTER_LOCATION = NamedLocationIdentity.create("SnippetCounter"); + protected static final LocationIdentity SNIPPET_COUNTER_LOCATION = NamedLocationIdentity.mutable("SnippetCounter"); /** * Increments the value of this counter. This method can be safely used in a snippet if it is