Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
14631:97321295c974 | 14632:5f5e2711dc24 |
---|---|
74 throw new RuntimeException(e); | 74 throw new RuntimeException(e); |
75 } | 75 } |
76 } | 76 } |
77 | 77 |
78 static <E extends ValueNode> TestRootNode<E> createRoot(NodeFactory<E> factory, Object... constants) { | 78 static <E extends ValueNode> TestRootNode<E> createRoot(NodeFactory<E> factory, Object... constants) { |
79 return new TestRootNode<>(createNode(factory, constants)); | 79 TestRootNode<E> rootNode = new TestRootNode<>(createNode(factory, constants)); |
80 rootNode.adoptChildren(); | |
81 return rootNode; | |
80 } | 82 } |
81 | 83 |
82 static <E extends ValueNode> TestRootNode<E> createGenericRoot(NodeFactory<E> factory, Object... constants) { | 84 static <E extends ValueNode> TestRootNode<E> createGenericRoot(NodeFactory<E> factory, Object... constants) { |
83 return new TestRootNode<>(createGenericNode(factory, constants)); | 85 TestRootNode<E> rootNode = new TestRootNode<>(createGenericNode(factory, constants)); |
86 rootNode.adoptChildren(); | |
87 return rootNode; | |
84 } | 88 } |
85 | 89 |
86 static CallTarget createCallTarget(ValueNode node) { | 90 static CallTarget createCallTarget(ValueNode node) { |
87 return createCallTarget(new TestRootNode<>(node)); | 91 return createCallTarget(new TestRootNode<>(node)); |
88 } | 92 } |