Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/expression/demo/SLAddWithoutSpecializationNode.java @ 14628:a08b8694f556
Truffle: Node API changes
deprecate adoptChild, no longer needed in constructor
add Node#insert for inserting new nodes into the tree (previously adoptChild)
add Node#adoptChildren() helper method that adopts all (direct and indirect) children of a node, automatically called in TruffleRuntime#createCallTarget
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Wed, 19 Mar 2014 23:11:46 +0100 |
parents | f3e4f746e9c6 |
children | abe7128ca473 |
comparison
equal
deleted
inserted
replaced
14627:46c020971d9c | 14628:a08b8694f556 |
---|---|
40 | 40 |
41 @Child private SLExpressionNode leftNode; | 41 @Child private SLExpressionNode leftNode; |
42 @Child private SLExpressionNode rightNode; | 42 @Child private SLExpressionNode rightNode; |
43 | 43 |
44 public SLAddWithoutSpecializationNode(SLExpressionNode leftNode, SLExpressionNode rightNode) { | 44 public SLAddWithoutSpecializationNode(SLExpressionNode leftNode, SLExpressionNode rightNode) { |
45 this.leftNode = adoptChild(leftNode); | 45 this.leftNode = leftNode; |
46 this.rightNode = adoptChild(rightNode); | 46 this.rightNode = rightNode; |
47 } | 47 } |
48 | 48 |
49 @Override | 49 @Override |
50 public Object executeGeneric(VirtualFrame frame) { | 50 public Object executeGeneric(VirtualFrame frame) { |
51 /* Evaluate the child nodes. */ | 51 /* Evaluate the child nodes. */ |