Mercurial > hg > graal-jvmci-8
comparison graal/GraalCompiler/src/com/sun/c1x/ir/NewInstance.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 |
---|---|
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.debug.*; | 26 import com.sun.c1x.debug.*; |
27 import com.sun.c1x.value.*; | |
28 import com.sun.cri.ci.*; | 27 import com.sun.cri.ci.*; |
29 import com.sun.cri.ri.*; | 28 import com.sun.cri.ri.*; |
30 | 29 |
31 /** | 30 /** |
32 * The {@code NewInstance} instruction represents the allocation of an instance class object. | 31 * The {@code NewInstance} instruction represents the allocation of an instance class object. |
33 */ | 32 */ |
34 public final class NewInstance extends StateSplit { | 33 public final class NewInstance extends Instruction { |
35 | 34 |
36 private static final int INPUT_COUNT = 0; | 35 private static final int INPUT_COUNT = 0; |
37 private static final int SUCCESSOR_COUNT = 0; | 36 private static final int SUCCESSOR_COUNT = 0; |
38 | 37 |
39 final RiType instanceClass; | 38 final RiType instanceClass; |
45 * @param type the class being allocated | 44 * @param type the class being allocated |
46 * @param cpi the constant pool index | 45 * @param cpi the constant pool index |
47 * @param stateBefore the state before executing this instruction | 46 * @param stateBefore the state before executing this instruction |
48 * @param graph | 47 * @param graph |
49 */ | 48 */ |
50 public NewInstance(RiType type, int cpi, RiConstantPool constantPool, FrameState stateBefore, Graph graph) { | 49 public NewInstance(RiType type, int cpi, RiConstantPool constantPool, Graph graph) { |
51 super(CiKind.Object, stateBefore, INPUT_COUNT, SUCCESSOR_COUNT, graph); | 50 super(CiKind.Object, INPUT_COUNT, SUCCESSOR_COUNT, graph); |
52 this.instanceClass = type; | 51 this.instanceClass = type; |
53 this.cpi = cpi; | 52 this.cpi = cpi; |
54 this.constantPool = constantPool; | 53 this.constantPool = constantPool; |
55 setFlag(Flag.NonNull); | 54 setFlag(Flag.NonNull); |
56 } | 55 } |
72 public RiType exactType() { | 71 public RiType exactType() { |
73 return instanceClass; | 72 return instanceClass; |
74 } | 73 } |
75 | 74 |
76 @Override | 75 @Override |
76 public boolean canTrap() { | |
77 return true; | |
78 } | |
79 | |
80 @Override | |
77 public void accept(ValueVisitor v) { | 81 public void accept(ValueVisitor v) { |
78 v.visitNewInstance(this); | 82 v.visitNewInstance(this); |
79 } | 83 } |
80 | 84 |
81 @Override | 85 @Override |