Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/TestHelper.java @ 14632:5f5e2711dc24
fix TruffleDSL tests
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Thu, 20 Mar 2014 03:14:12 +0100 |
parents | 2864cb92fa9a |
children | 64dcb92ee75a |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/TestHelper.java Thu Mar 20 02:22:16 2014 +0100 +++ b/graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/TestHelper.java Thu Mar 20 03:14:12 2014 +0100 @@ -76,11 +76,15 @@ } static <E extends ValueNode> TestRootNode<E> createRoot(NodeFactory<E> factory, Object... constants) { - return new TestRootNode<>(createNode(factory, constants)); + TestRootNode<E> rootNode = new TestRootNode<>(createNode(factory, constants)); + rootNode.adoptChildren(); + return rootNode; } static <E extends ValueNode> TestRootNode<E> createGenericRoot(NodeFactory<E> factory, Object... constants) { - return new TestRootNode<>(createGenericNode(factory, constants)); + TestRootNode<E> rootNode = new TestRootNode<>(createGenericNode(factory, constants)); + rootNode.adoptChildren(); + return rootNode; } static CallTarget createCallTarget(ValueNode node) {