comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/AddNode.java @ 19410: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 b017118b412b
comparison
equal deleted inserted replaced
19409:a16f1bbe2965 19410:61d3cb8e1280
34 import com.oracle.graal.nodes.spi.*; 34 import com.oracle.graal.nodes.spi.*;
35 35
36 @NodeInfo(shortName = "+") 36 @NodeInfo(shortName = "+")
37 public class AddNode extends BinaryArithmeticNode<Add> implements NarrowableArithmeticNode { 37 public class AddNode extends BinaryArithmeticNode<Add> implements NarrowableArithmeticNode {
38 38
39 public static final NodeClass TYPE = NodeClass.get(AddNode.class); 39 public static final NodeClass<AddNode> TYPE = NodeClass.get(AddNode.class);
40 40
41 public AddNode(ValueNode x, ValueNode y) { 41 public AddNode(ValueNode x, ValueNode y) {
42 this(TYPE, x, y); 42 this(TYPE, x, y);
43 } 43 }
44 44
45 protected AddNode(NodeClass c, ValueNode x, ValueNode y) { 45 protected AddNode(NodeClass<?> c, ValueNode x, ValueNode y) {
46 super(c, ArithmeticOpTable::getAdd, x, y); 46 super(c, ArithmeticOpTable::getAdd, x, y);
47 } 47 }
48 48
49 public static ValueNode create(ValueNode x, ValueNode y) { 49 public static ValueNode create(ValueNode x, ValueNode y) {
50 BinaryOp<Add> op = ArithmeticOpTable.forStamp(x.stamp()).getAdd(); 50 BinaryOp<Add> op = ArithmeticOpTable.forStamp(x.stamp()).getAdd();