Mercurial > hg > truffle
diff graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AbstractNewArrayNode.java @ 16895:06c15e88d383
added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 18 Aug 2014 14:04:21 +0200 |
parents | cbd42807a31f |
children | f90dcdbbb75e |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AbstractNewArrayNode.java Mon Aug 18 13:49:25 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/AbstractNewArrayNode.java Mon Aug 18 14:04:21 2014 +0200 @@ -48,6 +48,10 @@ * @param length the node that produces the length for this allocation. * @param fillContents determines whether the array elements should be initialized to zero/null. */ + public static AbstractNewArrayNode create(Stamp stamp, ValueNode length, boolean fillContents) { + return new AbstractNewArrayNodeGen(stamp, length, fillContents); + } + protected AbstractNewArrayNode(Stamp stamp, ValueNode length, boolean fillContents) { super(stamp, fillContents); this.length = length;