# HG changeset patch # User Lukas Stadler # Date 1405599970 -7200 # Node ID af52fd81a7a3c3f898332f1d0847e40f0e3f1b12 # Parent 0f28c558d8507d7dd65936d5f545b0785ddd57f1 initializing constructors for GuardPhiNode and MemoryPhiNode diff -r 0f28c558d850 -r af52fd81a7a3 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardPhiNode.java --- 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 values = new NodeInputList<>(this); + @OptionalInput(InputType.Guard) final NodeInputList 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 diff -r 0f28c558d850 -r af52fd81a7a3 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryPhiNode.java --- 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 values = new NodeInputList<>(this); + @Input(InputType.Memory) final NodeInputList 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() {