Mercurial > hg > truffle
comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ProxyNode.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 | 0f6dd67470d9 |
children | c483912aaf70 |
comparison
equal
deleted
inserted
replaced
9435:794370a64b71 | 9436:ae815a4c112a |
---|---|
35 * loop. | 35 * loop. |
36 */ | 36 */ |
37 @NodeInfo(nameTemplate = "{p#type/s}Proxy") | 37 @NodeInfo(nameTemplate = "{p#type/s}Proxy") |
38 public class ProxyNode extends FloatingNode implements Node.IterableNodeType, ValueNumberable, Canonicalizable, Virtualizable, LIRLowerable { | 38 public class ProxyNode extends FloatingNode implements Node.IterableNodeType, ValueNumberable, Canonicalizable, Virtualizable, LIRLowerable { |
39 | 39 |
40 @Input(notDataflow = true) private BeginNode proxyPoint; | 40 @Input(notDataflow = true) private AbstractBeginNode proxyPoint; |
41 @Input private ValueNode value; | 41 @Input private ValueNode value; |
42 private final PhiType type; | 42 private final PhiType type; |
43 private final Object identity; | 43 private final Object identity; |
44 | 44 |
45 public ProxyNode(ValueNode value, BeginNode exit, PhiType type, Object identity) { | 45 public ProxyNode(ValueNode value, AbstractBeginNode exit, PhiType type, Object identity) { |
46 super(type == PhiType.Value ? value.stamp() : type.stamp); | 46 super(type == PhiType.Value ? value.stamp() : type.stamp); |
47 this.type = type; | 47 this.type = type; |
48 this.identity = identity; | 48 this.identity = identity; |
49 assert exit != null; | 49 assert exit != null; |
50 this.proxyPoint = exit; | 50 this.proxyPoint = exit; |
63 @Override | 63 @Override |
64 public Stamp stamp() { | 64 public Stamp stamp() { |
65 return value().stamp(); | 65 return value().stamp(); |
66 } | 66 } |
67 | 67 |
68 public BeginNode proxyPoint() { | 68 public AbstractBeginNode proxyPoint() { |
69 return proxyPoint; | 69 return proxyPoint; |
70 } | 70 } |
71 | 71 |
72 public PhiType type() { | 72 public PhiType type() { |
73 return type; | 73 return type; |
106 tool.replaceWithVirtual(state.getVirtualObject()); | 106 tool.replaceWithVirtual(state.getVirtualObject()); |
107 } | 107 } |
108 } | 108 } |
109 } | 109 } |
110 | 110 |
111 public static ProxyNode forValue(ValueNode value, BeginNode exit, StructuredGraph graph) { | 111 public static ProxyNode forValue(ValueNode value, AbstractBeginNode exit, StructuredGraph graph) { |
112 return graph.unique(new ProxyNode(value, exit, PhiType.Value, null)); | 112 return graph.unique(new ProxyNode(value, exit, PhiType.Value, null)); |
113 } | 113 } |
114 | 114 |
115 public static ProxyNode forMemory(ValueNode value, BeginNode exit, Object location, StructuredGraph graph) { | 115 public static ProxyNode forMemory(ValueNode value, AbstractBeginNode exit, Object location, StructuredGraph graph) { |
116 return graph.unique(new ProxyNode(value, exit, PhiType.Memory, location)); | 116 return graph.unique(new ProxyNode(value, exit, PhiType.Memory, location)); |
117 } | 117 } |
118 | 118 |
119 } | 119 } |