comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewArrayNode.java @ 5760:87e8baf5447c

added snippets for lowering array creation and initialization (in NewObjectSnippets) made it possible to use node intrinsics with arguments that may only be constant when a snippet template is created rename: NewTypeArrayNode -> NewPrimitiveArrayNode removed HotSpotVMConfig.getArrayOffset() - Kind.arrayBaseOffset() is used instead renamed field prototypeHeader to initialMarkWord in HotSpotResolvedJavaType rename: NewInstanceSnippets -> NewObjectSnippets renamed node intrinsics in DirectObjectStoreNode to include the type of the value being stored (to avoid accidental misuse) extended WordTypeRewriterPhase such that ObjectEqualsNodes are replaced with IntegerEqualsNodes when the values being compared are words (which allows '==' and '!=' to be used between Word values in Java source code)
author Doug Simon <doug.simon@oracle.com>
date Tue, 03 Jul 2012 23:49:01 +0200
parents aa52cbbab598
children 6a725f3c4bb0
comparison
equal deleted inserted replaced
5749:12706c5b39bc 5760:87e8baf5447c
34 import com.oracle.graal.nodes.util.*; 34 import com.oracle.graal.nodes.util.*;
35 35
36 /** 36 /**
37 * The {@code NewArrayNode} class is the base of all instructions that allocate arrays. 37 * The {@code NewArrayNode} class is the base of all instructions that allocate arrays.
38 */ 38 */
39 public abstract class NewArrayNode extends FixedWithNextNode implements EscapeAnalyzable, TypeFeedbackProvider { 39 public abstract class NewArrayNode extends FixedWithNextNode implements Lowerable, EscapeAnalyzable, TypeFeedbackProvider {
40 40
41 @Input private ValueNode length; 41 @Input private ValueNode length;
42 42
43 public static final int MaximumEscapeAnalysisArrayLength = 32; 43 public static final int MaximumEscapeAnalysisArrayLength = 32;
44 44
82 tool.addScalar(length).constantBound(Condition.GE, Constant.INT_0); 82 tool.addScalar(length).constantBound(Condition.GE, Constant.INT_0);
83 } 83 }
84 84
85 public EscapeOp getEscapeOp() { 85 public EscapeOp getEscapeOp() {
86 return ESCAPE; 86 return ESCAPE;
87 }
88
89 @Override
90 public void lower(LoweringTool tool) {
91 tool.getRuntime().lower(this, tool);
87 } 92 }
88 93
89 private static final EscapeOp ESCAPE = new EscapeOp() { 94 private static final EscapeOp ESCAPE = new EscapeOp() {
90 95
91 @Override 96 @Override