Mercurial > hg > graal-compiler
changeset 16550:af52fd81a7a3
initializing constructors for GuardPhiNode and MemoryPhiNode
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Thu, 17 Jul 2014 14:26:10 +0200 |
parents | 0f28c558d850 |
children | 5cdca60d0f9f |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardPhiNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryPhiNode.java |
diffstat | 2 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardPhiNode.java Thu Jul 17 14:25:41 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardPhiNode.java Thu Jul 17 14:26:10 2014 +0200 @@ -32,10 +32,16 @@ @NodeInfo(nameTemplate = "GuardPhi({i#values})", allowedUsageTypes = {InputType.Guard}) public class GuardPhiNode extends PhiNode implements GuardingNode { - @OptionalInput(InputType.Guard) final NodeInputList<ValueNode> values = new NodeInputList<>(this); + @OptionalInput(InputType.Guard) final NodeInputList<ValueNode> values; public GuardPhiNode(MergeNode merge) { super(StampFactory.forVoid(), merge); + this.values = new NodeInputList<>(this); + } + + public GuardPhiNode(MergeNode merge, ValueNode[] values) { + super(StampFactory.forVoid(), merge); + this.values = new NodeInputList<>(this, values); } @Override
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryPhiNode.java Thu Jul 17 14:25:41 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryPhiNode.java Thu Jul 17 14:26:10 2014 +0200 @@ -33,12 +33,19 @@ @NodeInfo(nameTemplate = "MemoryPhi({i#values}) {p#locationIdentity/s}", allowedUsageTypes = {InputType.Memory}) public class MemoryPhiNode extends PhiNode implements MemoryNode { - @Input(InputType.Memory) final NodeInputList<ValueNode> values = new NodeInputList<>(this); + @Input(InputType.Memory) final NodeInputList<ValueNode> values; private final LocationIdentity locationIdentity; public MemoryPhiNode(MergeNode merge, LocationIdentity locationIdentity) { super(StampFactory.forVoid(), merge); this.locationIdentity = locationIdentity; + this.values = new NodeInputList<>(this); + } + + public MemoryPhiNode(MergeNode merge, LocationIdentity locationIdentity, ValueNode[] values) { + super(StampFactory.forVoid(), merge); + this.locationIdentity = locationIdentity; + this.values = new NodeInputList<>(this, values); } public LocationIdentity getLocationIdentity() {