Mercurial > hg > truffle
comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewInstanceNode.java @ 10670:5bab3272bb82
Make array allocations deoptimizing nodes.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Tue, 09 Jul 2013 11:58:02 +0200 |
parents | f7ec3ec8a03c |
children | b36028c30a81 |
comparison
equal
deleted
inserted
replaced
10669:f11cd00d4115 | 10670:5bab3272bb82 |
---|---|
31 | 31 |
32 /** | 32 /** |
33 * The {@code NewInstanceNode} represents the allocation of an instance class object. | 33 * The {@code NewInstanceNode} represents the allocation of an instance class object. |
34 */ | 34 */ |
35 @NodeInfo(nameTemplate = "New {p#instanceClass/s}") | 35 @NodeInfo(nameTemplate = "New {p#instanceClass/s}") |
36 public final class NewInstanceNode extends FixedWithNextNode implements Node.IterableNodeType, Canonicalizable, Lowerable, VirtualizableAllocation { | 36 public final class NewInstanceNode extends DeoptimizingFixedWithNextNode implements Node.IterableNodeType, Canonicalizable, Lowerable, VirtualizableAllocation { |
37 | 37 |
38 private final ResolvedJavaType instanceClass; | 38 private final ResolvedJavaType instanceClass; |
39 private final boolean fillContents; | 39 private final boolean fillContents; |
40 | 40 |
41 /** | 41 /** |
93 } | 93 } |
94 tool.createVirtualObject(virtualObject, state, null); | 94 tool.createVirtualObject(virtualObject, state, null); |
95 tool.replaceWithVirtual(virtualObject); | 95 tool.replaceWithVirtual(virtualObject); |
96 } | 96 } |
97 } | 97 } |
98 | |
99 @Override | |
100 public boolean canDeoptimize() { | |
101 return true; | |
102 } | |
103 | |
104 @Override | |
105 public DeoptimizationReason getDeoptimizationReason() { | |
106 return DeoptimizationReason.RuntimeConstraint; | |
107 } | |
98 } | 108 } |