comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLRootNode.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 5243fe9a3fbc
children 111bf82514ca
comparison
equal deleted inserted replaced
14627:46c020971d9c 14628:a08b8694f556
50 50
51 public SLRootNode(FrameDescriptor frameDescriptor, SLExpressionNode bodyNode, String name) { 51 public SLRootNode(FrameDescriptor frameDescriptor, SLExpressionNode bodyNode, String name) {
52 super(null, frameDescriptor); 52 super(null, frameDescriptor);
53 /* Deep copy the body before any specialization occurs during execution. */ 53 /* Deep copy the body before any specialization occurs during execution. */
54 this.uninitializedBodyNode = NodeUtil.cloneNode(bodyNode); 54 this.uninitializedBodyNode = NodeUtil.cloneNode(bodyNode);
55 this.bodyNode = adoptChild(bodyNode); 55 this.bodyNode = bodyNode;
56 this.name = name; 56 this.name = name;
57 } 57 }
58 58
59 @Override 59 @Override
60 public Object execute(VirtualFrame frame) { 60 public Object execute(VirtualFrame frame) {