annotate truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/TestHelper.java @ 22272:5309cc9668e3

Cleanup DSL tests from instrumentation dependencies.
author Christian Humer <christian.humer@oracle.com>
date Thu, 01 Oct 2015 14:00:17 +0200
parents dc83cc1f94f2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10597
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
1 /*
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
2 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
4 *
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
8 *
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
13 * accompanied this code).
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
14 *
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
18 *
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
21 * questions.
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
22 */
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
23 package com.oracle.truffle.api.dsl.test;
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
24
22272
5309cc9668e3 Cleanup DSL tests from instrumentation dependencies.
Christian Humer <christian.humer@oracle.com>
parents: 22157
diff changeset
25 import static org.junit.Assert.assertEquals;
5309cc9668e3 Cleanup DSL tests from instrumentation dependencies.
Christian Humer <christian.humer@oracle.com>
parents: 22157
diff changeset
26 import static org.junit.Assert.fail;
5309cc9668e3 Cleanup DSL tests from instrumentation dependencies.
Christian Humer <christian.humer@oracle.com>
parents: 22157
diff changeset
27
5309cc9668e3 Cleanup DSL tests from instrumentation dependencies.
Christian Humer <christian.humer@oracle.com>
parents: 22157
diff changeset
28 import java.util.ArrayList;
5309cc9668e3 Cleanup DSL tests from instrumentation dependencies.
Christian Humer <christian.humer@oracle.com>
parents: 22157
diff changeset
29 import java.util.Arrays;
5309cc9668e3 Cleanup DSL tests from instrumentation dependencies.
Christian Humer <christian.humer@oracle.com>
parents: 22157
diff changeset
30 import java.util.List;
5309cc9668e3 Cleanup DSL tests from instrumentation dependencies.
Christian Humer <christian.humer@oracle.com>
parents: 22157
diff changeset
31
22157
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22003
diff changeset
32 import com.oracle.truffle.api.CallTarget;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22003
diff changeset
33 import com.oracle.truffle.api.RootCallTarget;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22003
diff changeset
34 import com.oracle.truffle.api.Truffle;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22003
diff changeset
35 import com.oracle.truffle.api.dsl.NodeFactory;
10597
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
36 import com.oracle.truffle.api.dsl.test.TypeSystemTest.ArgumentNode;
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
37 import com.oracle.truffle.api.dsl.test.TypeSystemTest.ChildrenNode;
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
38 import com.oracle.truffle.api.dsl.test.TypeSystemTest.TestRootNode;
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
39 import com.oracle.truffle.api.dsl.test.TypeSystemTest.ValueNode;
22157
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22003
diff changeset
40 import com.oracle.truffle.api.frame.VirtualFrame;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22003
diff changeset
41 import com.oracle.truffle.api.nodes.Node;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22003
diff changeset
42 import com.oracle.truffle.api.nodes.RootNode;
10597
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
43
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
44 /**
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
45 * Utility class to provide some test helper functions.
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
46 */
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
47 class TestHelper {
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
48
20940
476374f3fe9a Truffle-DSL: generate better polymorphic execute signatures
Christian Humer <christian.humer@gmail.com>
parents: 19289
diff changeset
49 // make nodes replacable
476374f3fe9a Truffle-DSL: generate better polymorphic execute signatures
Christian Humer <christian.humer@gmail.com>
parents: 19289
diff changeset
50 public static <T extends Node> T createRoot(final T node) {
22003
5bc7f7b867ab Making debugger always on for each TruffleVM execution. Introducing EventConsumer to process such debugger events. Requesting each RootNode to be associated with a TruffleLanguage, so debugger can find out proper context for each Node where executions gets suspended.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
51 new RootNode(TestingLanguage.class, null, null) {
20940
476374f3fe9a Truffle-DSL: generate better polymorphic execute signatures
Christian Humer <christian.humer@gmail.com>
parents: 19289
diff changeset
52 @Child T child = node;
476374f3fe9a Truffle-DSL: generate better polymorphic execute signatures
Christian Humer <christian.humer@gmail.com>
parents: 19289
diff changeset
53
476374f3fe9a Truffle-DSL: generate better polymorphic execute signatures
Christian Humer <christian.humer@gmail.com>
parents: 19289
diff changeset
54 @Override
476374f3fe9a Truffle-DSL: generate better polymorphic execute signatures
Christian Humer <christian.humer@gmail.com>
parents: 19289
diff changeset
55 public Object execute(VirtualFrame frame) {
476374f3fe9a Truffle-DSL: generate better polymorphic execute signatures
Christian Humer <christian.humer@gmail.com>
parents: 19289
diff changeset
56 return null;
476374f3fe9a Truffle-DSL: generate better polymorphic execute signatures
Christian Humer <christian.humer@gmail.com>
parents: 19289
diff changeset
57 }
476374f3fe9a Truffle-DSL: generate better polymorphic execute signatures
Christian Humer <christian.humer@gmail.com>
parents: 19289
diff changeset
58 }.adoptChildren();
476374f3fe9a Truffle-DSL: generate better polymorphic execute signatures
Christian Humer <christian.humer@gmail.com>
parents: 19289
diff changeset
59 return node;
476374f3fe9a Truffle-DSL: generate better polymorphic execute signatures
Christian Humer <christian.humer@gmail.com>
parents: 19289
diff changeset
60 }
476374f3fe9a Truffle-DSL: generate better polymorphic execute signatures
Christian Humer <christian.humer@gmail.com>
parents: 19289
diff changeset
61
10597
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
62 private static ArgumentNode[] arguments(int count) {
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
63 ArgumentNode[] nodes = new ArgumentNode[count];
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
64 for (int i = 0; i < nodes.length; i++) {
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
65 nodes[i] = new ArgumentNode(i);
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
66 }
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
67 return nodes;
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
68 }
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
69
16967
c5db657d93c1 Truffle-DSL: added test for source sections in @CreateCast methods.
Christian Humer <christian.humer@gmail.com>
parents: 16756
diff changeset
70 static <E extends ValueNode> E createNode(NodeFactory<E> factory, boolean prefixConstants, Object... constants) {
10597
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
71 ArgumentNode[] argumentNodes = arguments(factory.getExecutionSignature().size());
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
72
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
73 List<Object> argumentList = new ArrayList<>();
16967
c5db657d93c1 Truffle-DSL: added test for source sections in @CreateCast methods.
Christian Humer <christian.humer@gmail.com>
parents: 16756
diff changeset
74 if (prefixConstants) {
c5db657d93c1 Truffle-DSL: added test for source sections in @CreateCast methods.
Christian Humer <christian.humer@gmail.com>
parents: 16756
diff changeset
75 argumentList.addAll(Arrays.asList(constants));
c5db657d93c1 Truffle-DSL: added test for source sections in @CreateCast methods.
Christian Humer <christian.humer@gmail.com>
parents: 16756
diff changeset
76 }
13528
5a0c694ef735 Truffle-DSL: Removed API classes NodeId, NodeContainer and SpecializationListener.
Christian Humer <christian.humer@gmail.com>
parents: 12401
diff changeset
77 if (ChildrenNode.class.isAssignableFrom(factory.getNodeClass())) {
10597
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
78 argumentList.add(argumentNodes);
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
79 } else {
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
80 argumentList.addAll(Arrays.asList(argumentNodes));
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
81 }
16967
c5db657d93c1 Truffle-DSL: added test for source sections in @CreateCast methods.
Christian Humer <christian.humer@gmail.com>
parents: 16756
diff changeset
82 if (!prefixConstants) {
c5db657d93c1 Truffle-DSL: added test for source sections in @CreateCast methods.
Christian Humer <christian.humer@gmail.com>
parents: 16756
diff changeset
83 argumentList.addAll(Arrays.asList(constants));
c5db657d93c1 Truffle-DSL: added test for source sections in @CreateCast methods.
Christian Humer <christian.humer@gmail.com>
parents: 16756
diff changeset
84 }
10597
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
85 return factory.createNode(argumentList.toArray(new Object[argumentList.size()]));
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
86 }
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
87
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
88 static <E extends ValueNode> TestRootNode<E> createRoot(NodeFactory<E> factory, Object... constants) {
16967
c5db657d93c1 Truffle-DSL: added test for source sections in @CreateCast methods.
Christian Humer <christian.humer@gmail.com>
parents: 16756
diff changeset
89 TestRootNode<E> rootNode = new TestRootNode<>(createNode(factory, false, constants));
14632
5f5e2711dc24 fix TruffleDSL tests
Andreas Woess <andreas.woess@jku.at>
parents: 14042
diff changeset
90 rootNode.adoptChildren();
5f5e2711dc24 fix TruffleDSL tests
Andreas Woess <andreas.woess@jku.at>
parents: 14042
diff changeset
91 return rootNode;
10597
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
92 }
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
93
16967
c5db657d93c1 Truffle-DSL: added test for source sections in @CreateCast methods.
Christian Humer <christian.humer@gmail.com>
parents: 16756
diff changeset
94 static <E extends ValueNode> TestRootNode<E> createRootPrefix(NodeFactory<E> factory, boolean prefixConstants, Object... constants) {
c5db657d93c1 Truffle-DSL: added test for source sections in @CreateCast methods.
Christian Humer <christian.humer@gmail.com>
parents: 16756
diff changeset
95 TestRootNode<E> rootNode = new TestRootNode<>(createNode(factory, prefixConstants, constants));
14632
5f5e2711dc24 fix TruffleDSL tests
Andreas Woess <andreas.woess@jku.at>
parents: 14042
diff changeset
96 rootNode.adoptChildren();
5f5e2711dc24 fix TruffleDSL tests
Andreas Woess <andreas.woess@jku.at>
parents: 14042
diff changeset
97 return rootNode;
12401
85dcc7f59c34 Truffle-DSL: fixed incorrect else guard connections for executeAndSpecialize.
Christian Humer <christian.humer@gmail.com>
parents: 11473
diff changeset
98 }
85dcc7f59c34 Truffle-DSL: fixed incorrect else guard connections for executeAndSpecialize.
Christian Humer <christian.humer@gmail.com>
parents: 11473
diff changeset
99
10597
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
100 static CallTarget createCallTarget(ValueNode node) {
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
101 return createCallTarget(new TestRootNode<>(node));
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
102 }
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
103
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
104 static CallTarget createCallTarget(TestRootNode<? extends ValueNode> node) {
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
105 return Truffle.getRuntime().createCallTarget(node);
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
106 }
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
107
19289
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
108 static RootCallTarget createCallTarget(NodeFactory<? extends ValueNode> factory, Object... constants) {
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
109 return Truffle.getRuntime().createCallTarget(createRoot(factory, constants));
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
110 }
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
111
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
112 static boolean assertionsEnabled() {
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
113 boolean assertOn = false;
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
114 // *assigns* true if assertions are on.
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
115 assert (assertOn = true) == true;
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
116 return assertOn;
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
117 }
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
118
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
119 @SuppressWarnings("unchecked")
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
120 static <T extends ValueNode> T getNode(CallTarget target) {
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
121 return ((TestRootNode<T>) ((RootCallTarget) target).getRootNode()).getNode();
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
122 }
62c43fcf5be2 Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
Christian Humer <christian.humer@gmail.com>
parents: 16967
diff changeset
123
10597
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
124 static <E> Object executeWith(TestRootNode<? extends ValueNode> node, Object... values) {
14991
64dcb92ee75a Truffle: Change signature for Truffle calls from (PackedFrame, Arguments) to (Object[]).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 14632
diff changeset
125 return createCallTarget(node).call(values);
10597
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
126 }
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
127
16756
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
128 static Object[] array(Object... val) {
11464
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
129 return val;
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
130 }
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
131
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
132 static <E> List<List<E>> permutations(List<E> list) {
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
133 return permutations(new ArrayList<E>(), list, new ArrayList<List<E>>());
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
134 }
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
135
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
136 static Object[][] permutations(Object... list) {
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
137 List<List<Object>> permutations = permutations(Arrays.asList(list));
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
138
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
139 Object[][] a = new Object[permutations.size()][];
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
140 int index = 0;
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
141 for (List<Object> p : permutations) {
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
142 a[index] = p.toArray(new Object[p.size()]);
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
143 index++;
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
144 }
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
145
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
146 return a;
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
147 }
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
148
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
149 static <E> List<List<E>> permutations(List<E> prefix, List<E> suffix, List<List<E>> output) {
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
150 if (suffix.size() == 1) {
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
151 ArrayList<E> newElement = new ArrayList<>(prefix);
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
152 newElement.addAll(suffix);
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
153 output.add(newElement);
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
154 return output;
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
155 }
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
156
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
157 for (int i = 0; i < suffix.size(); i++) {
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
158 List<E> newPrefix = new ArrayList<>(prefix);
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
159 newPrefix.add(suffix.get(i));
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
160 List<E> newSuffix = new ArrayList<>(suffix);
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
161 newSuffix.remove(i);
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
162 permutations(newPrefix, newSuffix, output);
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
163 }
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
164
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
165 return output;
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
166 }
e55e24cc3e7b Truffle-DSL: added permutation util functions to the TestHelper.
Christian Humer <christian.humer@gmail.com>
parents: 11191
diff changeset
167
16756
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
168 static void assertRuns(NodeFactory<? extends ValueNode> factory, Object[] testValues, Object[] result) {
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
169 assertRuns(factory, testValues, result, null);
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
170 }
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
171
11469
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
172 /* Methods tests all test values in combinational order. */
16756
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
173 static void assertRuns(NodeFactory<? extends ValueNode> factory, Object[] testValues, Object[] result, ExecutionListener listener) {
11469
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
174 // test each run by its own.
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
175 for (int i = 0; i < testValues.length; i++) {
16756
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
176 assertValue(createRoot(factory), 0, testValues[i], result[i], listener, true);
11469
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
177 }
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
178
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
179 // test all combinations of the test values
16756
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
180 List<Object> testValuesList = Arrays.asList(testValues);
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
181 List<List<Object>> permuts = permutations(testValuesList);
11469
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
182 for (List<Object> list : permuts) {
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
183 TestRootNode<?> root = createRoot(factory);
16756
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
184 int index = 0;
11469
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
185 for (Object object : list) {
16756
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
186 assertValue(root, index, object, result[testValuesList.indexOf(object)], listener, index == list.size() - 1);
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
187 index++;
11469
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
188 }
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
189 }
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
190 }
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
191
16756
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
192 static void assertValue(TestRootNode<? extends ValueNode> root, int index, Object value, Object result, ExecutionListener listener, boolean last) {
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
193 Object actualResult = null;
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
194 if (result instanceof Class && Throwable.class.isAssignableFrom((Class<?>) result)) {
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
195 try {
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
196 if (value instanceof Object[]) {
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
197 actualResult = executeWith(root, (Object[]) value);
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
198 } else {
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
199 actualResult = executeWith(root, value);
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
200 }
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
201 fail(String.format("Exception %s expected but not occured.", result.getClass()));
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
202 } catch (Throwable e) {
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
203 actualResult = e;
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
204 if (!e.getClass().isAssignableFrom(((Class<?>) result))) {
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
205 e.printStackTrace();
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
206 fail(String.format("Incompatible exception class thrown. Expected %s but was %s.", result.toString(), e.getClass()));
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
207 }
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
208 }
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
209 } else if (value instanceof Object[]) {
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
210 actualResult = executeWith(root, (Object[]) value);
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
211 assertEquals(result, actualResult);
11469
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
212 } else {
16756
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
213 actualResult = executeWith(root, value);
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
214 assertEquals(result, actualResult);
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
215 }
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
216 if (listener != null) {
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
217 listener.afterExecution(root, index, value, result, actualResult, last);
11469
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
218 }
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
219 }
88316d1c4644 Truffle-DSL: preparations for implicit casts
Christian Humer <christian.humer@gmail.com>
parents: 11464
diff changeset
220
16756
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
221 public static final class LogListener implements ExecutionListener {
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
222
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
223 public void afterExecution(TestRootNode<? extends ValueNode> node, int index, Object value, Object expectedResult, Object actualResult, boolean last) {
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
224 System.out.printf("Run %3d Node:%-20s Parameters: %10s Expected: %10s Result %10s%n", index, node.getNode().getClass().getSimpleName(), value, expectedResult, actualResult);
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
225 }
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
226
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
227 }
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
228
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
229 interface ExecutionListener {
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
230
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
231 void afterExecution(TestRootNode<? extends ValueNode> node, int index, Object value, Object expectedResult, Object actualResult, boolean last);
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
232
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
233 }
5148aab962af Truffle-DSL: updated tests for the new generation layout.
Christian Humer <christian.humer@gmail.com>
parents: 14991
diff changeset
234
10597
79041ab43660 Truffle-DSL: API-change: Renamed truffle.api.codegen to truffle.api.dsl for all projects and packages.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
235 }