comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java @ 7017:70bff0fa64b1

Rename Invoke.isMegamorphic to isPolymorphic since it's what it is actually used for. InvokeWithExceptionNode should not be polymorphic by default
author Gilles Duboscq <duboscq@ssw.jku.at>
date Fri, 23 Nov 2012 12:18:01 +0100
parents 79119bd2505a
children e23980f4a890
comparison
equal deleted inserted replaced
7016:05e03daa8645 7017:70bff0fa64b1
37 public static final int EXCEPTION_EDGE = 1; 37 public static final int EXCEPTION_EDGE = 1;
38 38
39 @Input private final CallTargetNode callTarget; 39 @Input private final CallTargetNode callTarget;
40 @Input private FrameState stateAfter; 40 @Input private FrameState stateAfter;
41 private final int bci; 41 private final int bci;
42 // megamorph should only be true when the compiler is sure that the call site is megamorph, and false when in doubt 42 private boolean polymorphic;
43 private boolean megamorphic;
44 private boolean useForInlining; 43 private boolean useForInlining;
45 private final long leafGraphId; 44 private final long leafGraphId;
46 45
47 public InvokeWithExceptionNode(CallTargetNode callTarget, DispatchBeginNode exceptionEdge, int bci, long leafGraphId) { 46 public InvokeWithExceptionNode(CallTargetNode callTarget, DispatchBeginNode exceptionEdge, int bci, long leafGraphId) {
48 super(callTarget.returnStamp(), new BeginNode[]{null, exceptionEdge}, new double[]{1.0, 0.0}); 47 super(callTarget.returnStamp(), new BeginNode[]{null, exceptionEdge}, new double[]{1.0, 0.0});
49 this.bci = bci; 48 this.bci = bci;
50 this.callTarget = callTarget; 49 this.callTarget = callTarget;
51 this.leafGraphId = leafGraphId; 50 this.leafGraphId = leafGraphId;
52 this.megamorphic = true; 51 this.polymorphic = false;
53 this.useForInlining = true; 52 this.useForInlining = true;
54 } 53 }
55 54
56 public DispatchBeginNode exceptionEdge() { 55 public DispatchBeginNode exceptionEdge() {
57 return (DispatchBeginNode) blockSuccessor(EXCEPTION_EDGE); 56 return (DispatchBeginNode) blockSuccessor(EXCEPTION_EDGE);
76 public MethodCallTargetNode methodCallTarget() { 75 public MethodCallTargetNode methodCallTarget() {
77 return (MethodCallTargetNode) callTarget; 76 return (MethodCallTargetNode) callTarget;
78 } 77 }
79 78
80 @Override 79 @Override
81 public boolean isMegamorphic() { 80 public boolean isPolymorphic() {
82 return megamorphic; 81 return polymorphic;
83 } 82 }
84 83
85 @Override 84 @Override
86 public void setMegamorphic(boolean value) { 85 public void setPolymorphic(boolean value) {
87 this.megamorphic = value; 86 this.polymorphic = value;
88 } 87 }
89 88
90 @Override 89 @Override
91 public boolean useForInlining() { 90 public boolean useForInlining() {
92 return useForInlining; 91 return useForInlining;