comparison graal/GraalCompiler/src/com/sun/c1x/ir/NewArray.java @ 2622:91d3952f7eb7

Framestate work : using stateAFter and reducting the number of nodes with framestates. Intermediate state (does not pass tests)
author Gilles Duboscq <gilles.duboscq@oracle.com>
date Tue, 10 May 2011 12:37:46 +0200
parents f1bc67c2d453
children 4dd0573f510b
comparison
equal deleted inserted replaced
2621:dd115f80acf8 2622:91d3952f7eb7
21 * questions. 21 * questions.
22 */ 22 */
23 package com.sun.c1x.ir; 23 package com.sun.c1x.ir;
24 24
25 import com.oracle.graal.graph.*; 25 import com.oracle.graal.graph.*;
26 import com.sun.c1x.value.*;
27 import com.sun.cri.ci.*; 26 import com.sun.cri.ci.*;
28 27
29 /** 28 /**
30 * The {@code NewArray} class is the base of all instructions that allocate arrays. 29 * The {@code NewArray} class is the base of all instructions that allocate arrays.
31 */ 30 */
32 public abstract class NewArray extends StateSplit { 31 public abstract class NewArray extends Instruction {
33 32
34 private static final int INPUT_COUNT = 1; 33 private static final int INPUT_COUNT = 1;
35 private static final int INPUT_LENGTH = 0; 34 private static final int INPUT_LENGTH = 0;
36 35
37 private static final int SUCCESSOR_COUNT = 0; 36 private static final int SUCCESSOR_COUNT = 0;
63 * @param stateBefore the state before the allocation 62 * @param stateBefore the state before the allocation
64 * @param inputCount 63 * @param inputCount
65 * @param successorCount 64 * @param successorCount
66 * @param graph 65 * @param graph
67 */ 66 */
68 NewArray(Value length, FrameState stateBefore, int inputCount, int successorCount, Graph graph) { 67 NewArray(Value length, int inputCount, int successorCount, Graph graph) {
69 super(CiKind.Object, stateBefore, inputCount + INPUT_COUNT, successorCount + SUCCESSOR_COUNT, graph); 68 super(CiKind.Object, inputCount + INPUT_COUNT, successorCount + SUCCESSOR_COUNT, graph);
70 setFlag(Flag.NonNull); 69 setFlag(Flag.NonNull);
71 setLength(length); 70 setLength(length);
72 } 71 }
73 72
73 @Override
74 public boolean canTrap() {
75 return true;
76 }
74 } 77 }