Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java @ 9436:ae815a4c112a
Rename BeginNode => AbstractBeginNode and make abstract. Introduce concrete subclass BeginNode.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 29 Apr 2013 00:25:09 +0200 |
parents | e1200d5141fa |
children | ae5cd887e67c |
comparison
equal
deleted
inserted
replaced
9435:794370a64b71 | 9436:ae815a4c112a |
---|---|
32 import com.oracle.graal.nodes.util.*; | 32 import com.oracle.graal.nodes.util.*; |
33 | 33 |
34 @NodeInfo(nameTemplate = "Invoke!#{p#targetMethod/s}") | 34 @NodeInfo(nameTemplate = "Invoke!#{p#targetMethod/s}") |
35 public class InvokeWithExceptionNode extends ControlSplitNode implements Node.IterableNodeType, Invoke, MemoryCheckpoint, LIRLowerable { | 35 public class InvokeWithExceptionNode extends ControlSplitNode implements Node.IterableNodeType, Invoke, MemoryCheckpoint, LIRLowerable { |
36 | 36 |
37 @Successor private BeginNode next; | 37 @Successor private AbstractBeginNode next; |
38 @Successor private DispatchBeginNode exceptionEdge; | 38 @Successor private DispatchBeginNode exceptionEdge; |
39 @Input private final CallTargetNode callTarget; | 39 @Input private final CallTargetNode callTarget; |
40 @Input private FrameState deoptState; | 40 @Input private FrameState deoptState; |
41 @Input private FrameState stateAfter; | 41 @Input private FrameState stateAfter; |
42 private final int bci; | 42 private final int bci; |
59 public void setExceptionEdge(DispatchBeginNode x) { | 59 public void setExceptionEdge(DispatchBeginNode x) { |
60 updatePredecessor(exceptionEdge, x); | 60 updatePredecessor(exceptionEdge, x); |
61 exceptionEdge = x; | 61 exceptionEdge = x; |
62 } | 62 } |
63 | 63 |
64 public BeginNode next() { | 64 public AbstractBeginNode next() { |
65 return next; | 65 return next; |
66 } | 66 } |
67 | 67 |
68 public void setNext(BeginNode x) { | 68 public void setNext(AbstractBeginNode x) { |
69 updatePredecessor(next, x); | 69 updatePredecessor(next, x); |
70 next = x; | 70 next = x; |
71 } | 71 } |
72 | 72 |
73 public CallTargetNode callTarget() { | 73 public CallTargetNode callTarget() { |
119 } | 119 } |
120 | 120 |
121 @Override | 121 @Override |
122 public void setNext(FixedNode x) { | 122 public void setNext(FixedNode x) { |
123 if (x != null) { | 123 if (x != null) { |
124 this.setNext(BeginNode.begin(x)); | 124 this.setNext(AbstractBeginNode.begin(x)); |
125 } else { | 125 } else { |
126 this.setNext(null); | 126 this.setNext(null); |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
168 debugProperties.put("targetMethod", callTarget.targetName()); | 168 debugProperties.put("targetMethod", callTarget.targetName()); |
169 return debugProperties; | 169 return debugProperties; |
170 } | 170 } |
171 | 171 |
172 public void killExceptionEdge() { | 172 public void killExceptionEdge() { |
173 BeginNode edge = exceptionEdge(); | 173 AbstractBeginNode edge = exceptionEdge(); |
174 setExceptionEdge(null); | 174 setExceptionEdge(null); |
175 GraphUtil.killCFG(edge); | 175 GraphUtil.killCFG(edge); |
176 } | 176 } |
177 | 177 |
178 @Override | 178 @Override |
203 } | 203 } |
204 | 204 |
205 private static final double EXCEPTION_PROBA = 1e-5; | 205 private static final double EXCEPTION_PROBA = 1e-5; |
206 | 206 |
207 @Override | 207 @Override |
208 public double probability(BeginNode successor) { | 208 public double probability(AbstractBeginNode successor) { |
209 return successor == next ? 1 - EXCEPTION_PROBA : EXCEPTION_PROBA; | 209 return successor == next ? 1 - EXCEPTION_PROBA : EXCEPTION_PROBA; |
210 } | 210 } |
211 | 211 |
212 @Override | 212 @Override |
213 public boolean canDeoptimize() { | 213 public boolean canDeoptimize() { |