Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/controlflow/SLWhileNode.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 | afd6fa5e8229 |
children | f3a5036cc13c |
comparison
equal
deleted
inserted
replaced
14627:46c020971d9c | 14628:a08b8694f556 |
---|---|
53 public SLWhileNode(SLExpressionNode conditionNode, SLStatementNode bodyNode) { | 53 public SLWhileNode(SLExpressionNode conditionNode, SLStatementNode bodyNode) { |
54 /* | 54 /* |
55 * It is a Truffle requirement to call adoptChild(), which performs all the necessary steps | 55 * It is a Truffle requirement to call adoptChild(), which performs all the necessary steps |
56 * to add the new child to the node tree. | 56 * to add the new child to the node tree. |
57 */ | 57 */ |
58 this.conditionNode = adoptChild(conditionNode); | 58 this.conditionNode = conditionNode; |
59 this.bodyNode = adoptChild(bodyNode); | 59 this.bodyNode = bodyNode; |
60 } | 60 } |
61 | 61 |
62 @Override | 62 @Override |
63 public void executeVoid(VirtualFrame frame) { | 63 public void executeVoid(VirtualFrame frame) { |
64 int count = 0; | 64 int count = 0; |