Mercurial > hg > graal-jvmci-8
changeset 8563:a1a97de0dc9d
Merge.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Thu, 28 Mar 2013 16:35:24 +0100 |
parents | fc0d57b82c86 (diff) 8cb3984da2f8 (current diff) |
children | 0d0b1154438f |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/SafeAccessNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/SafeReadNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/SafeWriteNode.java |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Thu Mar 28 16:00:40 2013 +0100 +++ b/.hgignore Thu Mar 28 16:35:24 2013 +0100 @@ -67,5 +67,6 @@ *.bgv core.* *.jar +*.jar.* eclipse-build.xml rebuild-launch.out
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java Thu Mar 28 16:00:40 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java Thu Mar 28 16:35:24 2013 +0100 @@ -136,6 +136,7 @@ @ConstantParameter("alignment") int alignment, @ConstantParameter("headerSize") int headerSize, @ConstantParameter("log2ElementSize") int log2ElementSize, + @ConstantParameter("fillContents") boolean fillContents, @ConstantParameter("type") ResolvedJavaType type) { if (!belowThan(length, MAX_ARRAY_FAST_PATH_ALLOCATION_LENGTH)) { probability(DEOPT_PATH_PROBABILITY); @@ -144,7 +145,7 @@ } int allocationSize = computeArrayAllocationSize(length, alignment, headerSize, log2ElementSize); Word memory = TLABAllocateNode.allocateVariableSize(allocationSize); - return InitializeArrayNode.initialize(memory, length, allocationSize, type, true, false); + return InitializeArrayNode.initialize(memory, length, allocationSize, type, fillContents, false); } /** @@ -240,7 +241,7 @@ allocate = snippet("allocate", int.class); initializeObject = snippet("initializeObject", Word.class, Word.class, Word.class, int.class, boolean.class, boolean.class); initializeArray = snippet("initializeArray", Word.class, Word.class, int.class, int.class, Word.class, int.class, boolean.class, boolean.class); - allocateArrayAndInitialize = snippet("allocateArrayAndInitialize", int.class, int.class, int.class, int.class, ResolvedJavaType.class); + allocateArrayAndInitialize = snippet("allocateArrayAndInitialize", int.class, int.class, int.class, int.class, boolean.class, ResolvedJavaType.class); newmultiarray = snippet("newmultiarray", Word.class, int.class, int[].class); } @@ -299,7 +300,8 @@ InitializeArrayNode initializeNode = graph.add(new InitializeArrayNode(tlabAllocateNode, lengthNode, sizeNode, arrayType, newArrayNode.fillContents(), newArrayNode.locked())); graph.replaceFixedWithFixed(newArrayNode, initializeNode); } else { - Key key = new Key(allocateArrayAndInitialize).add("alignment", alignment).add("headerSize", headerSize).add("log2ElementSize", log2ElementSize).add("type", arrayType); + Key key = new Key(allocateArrayAndInitialize).add("alignment", alignment).add("headerSize", headerSize).add("log2ElementSize", log2ElementSize).add("fillContents", + newArrayNode.fillContents()).add("type", arrayType); Arguments arguments = new Arguments().add("length", lengthNode); SnippetTemplate template = cache.get(key, assumptions); Debug.log("Lowering allocateArrayAndInitialize in %s: node=%s, template=%s, arguments=%s", graph, newArrayNode, template, arguments);