# HG changeset patch # User Bernhard Urban # Date 1380551418 -7200 # Node ID 7b51e43b05cd465b9c1bf7196ccf3ed3839c23c3 # Parent 1ce74467ab518fe16b28a144f45214c968dc3da8 NewObjectSnippets: don't use a seperate location for initializing the array length field diff -r 1ce74467ab51 -r 7b51e43b05cd 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 Mon Sep 30 16:28:42 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java Mon Sep 30 16:30:18 2013 +0200 @@ -58,7 +58,6 @@ public class NewObjectSnippets implements Snippets { public static final LocationIdentity INIT_LOCATION = new NamedLocationIdentity("Initialization"); - public static final LocationIdentity ARRAY_LENGTH_LOCATION = new NamedLocationIdentity("ArrayLength"); @Snippet public static Word allocate(int size) { @@ -222,7 +221,7 @@ * Formats some allocated memory with an object header and zeroes out the rest. */ public static Object formatArray(Word hub, int allocationSize, int length, int headerSize, Word memory, Word prototypeMarkWord, boolean fillContents) { - memory.writeInt(arrayLengthOffset(), length, ARRAY_LENGTH_LOCATION); + memory.writeInt(arrayLengthOffset(), length, INIT_LOCATION); /* * store hub last as the concurrent garbage collectors assume length is valid if hub field * is not null