Mercurial > hg > truffle
comparison graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/MacroStateSplitNode.java @ 19403:61d3cb8e1280
Add generic parameter to NodeClass. Change Graph#getNodes(Class) to Graph#getNodes(NodeClass).
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 16 Feb 2015 17:47:43 +0100 |
parents | 7e2c87dae93e |
children | 880717e44675 |
comparison
equal
deleted
inserted
replaced
19402:a16f1bbe2965 | 19403:61d3cb8e1280 |
---|---|
36 * {@link MemoryCheckpoint}. | 36 * {@link MemoryCheckpoint}. |
37 */ | 37 */ |
38 @NodeInfo | 38 @NodeInfo |
39 public abstract class MacroStateSplitNode extends MacroNode implements StateSplit, MemoryCheckpoint.Single { | 39 public abstract class MacroStateSplitNode extends MacroNode implements StateSplit, MemoryCheckpoint.Single { |
40 | 40 |
41 public static final NodeClass TYPE = NodeClass.get(MacroStateSplitNode.class); | 41 public static final NodeClass<MacroStateSplitNode> TYPE = NodeClass.get(MacroStateSplitNode.class); |
42 @OptionalInput(InputType.State) protected FrameState stateAfter; | 42 @OptionalInput(InputType.State) protected FrameState stateAfter; |
43 | 43 |
44 public MacroStateSplitNode(NodeClass c, Invoke invoke) { | 44 public MacroStateSplitNode(NodeClass<?> c, Invoke invoke) { |
45 super(c, invoke); | 45 super(c, invoke); |
46 this.stateAfter = invoke.stateAfter(); | 46 this.stateAfter = invoke.stateAfter(); |
47 } | 47 } |
48 | 48 |
49 @Override | 49 @Override |
64 public LocationIdentity getLocationIdentity() { | 64 public LocationIdentity getLocationIdentity() { |
65 return LocationIdentity.ANY_LOCATION; | 65 return LocationIdentity.ANY_LOCATION; |
66 } | 66 } |
67 | 67 |
68 protected void replaceSnippetInvokes(StructuredGraph snippetGraph) { | 68 protected void replaceSnippetInvokes(StructuredGraph snippetGraph) { |
69 for (MethodCallTargetNode call : snippetGraph.getNodes(MethodCallTargetNode.class)) { | 69 for (MethodCallTargetNode call : snippetGraph.getNodes(MethodCallTargetNode.TYPE)) { |
70 Invoke invoke = call.invoke(); | 70 Invoke invoke = call.invoke(); |
71 if (!call.targetMethod().equals(getTargetMethod())) { | 71 if (!call.targetMethod().equals(getTargetMethod())) { |
72 throw new GraalInternalError("unexpected invoke %s in snippet", getClass().getSimpleName()); | 72 throw new GraalInternalError("unexpected invoke %s in snippet", getClass().getSimpleName()); |
73 } | 73 } |
74 assert invoke.stateAfter().bci == BytecodeFrame.AFTER_BCI; | 74 assert invoke.stateAfter().bci == BytecodeFrame.AFTER_BCI; |