annotate truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/ExecuteMethodTest.java @ 21951:9c8c0937da41

Moving all sources into truffle subdirectory
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Wed, 17 Jun 2015 10:58:08 +0200
parents graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/ExecuteMethodTest.java@476374f3fe9a
children dc83cc1f94f2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
1 /*
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
4 *
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
8 *
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
13 * accompanied this code).
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
14 *
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
18 *
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
21 * questions.
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
22 */
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
23 package com.oracle.truffle.api.dsl.test;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
24
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
25 import com.oracle.truffle.api.dsl.*;
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
26 import com.oracle.truffle.api.dsl.internal.*;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
27 import com.oracle.truffle.api.frame.*;
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
28 import com.oracle.truffle.api.nodes.*;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
29
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
30 public class ExecuteMethodTest {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
31
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
32 private static final String ERROR_NO_EXECUTE = "No accessible and overridable generic execute method found. Generic execute methods usually have the signature 'public abstract {Type} "
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
33 + "execute(VirtualFrame)' and must not throw any checked exceptions.";
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
34
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
35 @TypeSystem({int.class})
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
36 @DSLOptions(useNewLayout = true)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
37 static class ExecuteMethodTypes {
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
38 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
39
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
40 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
41 abstract static class ChildNoFrame extends Node {
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
42 abstract Object execute();
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
43 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
44
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
45 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
46 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
47 @ExpectError(ERROR_NO_EXECUTE)
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
48 abstract static class ExecuteThis1 extends Node {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
49
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
50 @Specialization
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
51 int doInt(int a) {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
52 return a;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
53 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
54 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
55
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
56 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
57 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
58 @ExpectError(ERROR_NO_EXECUTE)
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
59 abstract static class ExecuteThis2 extends Node {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
60
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
61 abstract Object execute() throws UnexpectedResultException;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
62
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
63 @Specialization
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
64 int doInt(int a) {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
65 return a;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
66 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
67 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
68
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
69 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
70 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
71 @ExpectError(ERROR_NO_EXECUTE)
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
72 abstract static class ExecuteThis3 extends Node {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
73
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
74 abstract int execute() throws UnexpectedResultException;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
75
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
76 @Specialization
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
77 int doInt(int a) {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
78 return a;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
79 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
80 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
81
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
82 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
83 @NodeChild(value = "a", type = ChildNoFrame.class)
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
84 abstract static class ExecuteThis4 extends Node {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
85
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
86 protected abstract Object execute();
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
87
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
88 @Specialization
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
89 int doInt(int a) {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
90 return a;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
91 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
92 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
93
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
94 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
95 @NodeChild(value = "a", type = ChildNoFrame.class)
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
96 abstract static class ExecuteThis5 extends Node {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
97
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
98 public abstract Object execute();
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
99
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
100 @Specialization
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
101 int doInt(int a) {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
102 return a;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
103 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
104 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
105
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
106 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
107 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
108 @ExpectError(ERROR_NO_EXECUTE)
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
109 abstract static class ExecuteThis6 extends Node {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
110
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
111 @SuppressWarnings({"unused", "static-method"})
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
112 private Object execute() {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
113 return 0;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
114 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
115
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
116 @Specialization
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
117 int doInt(int a) {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
118 return a;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
119 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
120 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
121
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
122 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
123 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
124 @ExpectError(ERROR_NO_EXECUTE)
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
125 abstract static class ExecuteThis7 extends Node {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
126
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
127 @SuppressWarnings("static-method")
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
128 public final int executeInt() {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
129 return 0;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
130 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
131
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
132 @Specialization
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
133 int doInt(int a) {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
134 return a;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
135 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
136 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
137
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
138 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
139 @NodeChild(value = "a", type = ChildNoFrame.class)
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
140 abstract static class ExecuteThis8 extends Node {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
141
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
142 abstract int executeInt();
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
143
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
144 abstract Object executeObject();
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
145
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
146 @Specialization
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
147 int doInt(int a) {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
148 return a;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
149 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
150
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
151 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
152
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
153 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
154 @NodeChild(value = "a", type = ChildNoFrame.class)
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
155 abstract static class ExecuteThis9 extends Node {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
156
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
157 abstract int executeInt();
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
158
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
159 // disambiguate executeObject
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
160 final Object executeObject() {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
161 return executeInt();
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
162 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
163
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
164 @Specialization
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
165 int doInt(int a) {
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
166 return a;
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
167 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
168 }
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
169
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
170 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
171 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
172 abstract static class ExecuteThisVoid1 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
173
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
174 abstract void executeVoid();
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
175
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
176 @Specialization
20938
18c0f02fa4d2 Truffle-DSL: make type systems optional.
Christian Humer <christian.humer@gmail.com>
parents: 19291
diff changeset
177 void doInt(@SuppressWarnings("unused") int a) {
18776
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
178 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
179 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
180
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
181 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
182 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
183 abstract static class ExecuteThisVoid2 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
184
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
185 // allow one execute void
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
186 abstract void executeVoid();
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
187
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
188 abstract Object executeObject();
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
189
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
190 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
191 int doInt(int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
192 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
193 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
194 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
195
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
196 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
197 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
198 abstract static class ExecuteThisVoid3 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
199
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
200 // allow only one execute void
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
201 abstract void executeVoid1();
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
202
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
203 abstract void executeVoid2();
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
204
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
205 abstract Object executeObject();
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
206
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
207 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
208 int doInt(int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
209 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
210 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
211 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
212
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
213 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
214 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
215 abstract static class ExecuteWithFrame1 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
216
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
217 // no frame in execute. no parameter in specializations
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
218 abstract Object executeNoFrame();
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
219
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
220 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
221 int doInt(int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
222 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
223 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
224 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
225
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
226 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
227 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
228 abstract static class ExecuteWithFrame2 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
229
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
230 // frame in execute also usable in specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
231 abstract Object executeWithFrame(VirtualFrame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
232
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
233 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
234 int doInt(@SuppressWarnings("unused") VirtualFrame frame, int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
235 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
236 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
237 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
238
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
239 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
240 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
241 abstract static class ExecuteWithFrame3 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
242
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
243 abstract Object executeWithFrame(Frame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
244
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
245 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
246 int doInt(@SuppressWarnings("unused") Frame frame, int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
247 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
248 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
249 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
250
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
251 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
252 @NodeChild(value = "a", type = ExecuteWithFrame4.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
253 abstract static class ExecuteWithFrame4 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
254
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
255 abstract Object executeWithFrame(MaterializedFrame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
256
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
257 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
258 int doInt(@SuppressWarnings("unused") MaterializedFrame frame, int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
259 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
260 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
261 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
262
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
263 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
264 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
265 abstract static class ExecuteWithFrameError1 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
266
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
267 abstract Object executeNoFrame();
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
268
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
269 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
270 @ExpectError("Method signature (VirtualFrame, int) does not match to the expected signature:%")
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
271 int doInt(@SuppressWarnings("unused") VirtualFrame frame, int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
272 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
273 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
274 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
275
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
276 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
277 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
278 abstract static class ExecuteWithFrameError2 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
279
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
280 abstract Object executeFrame(MaterializedFrame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
281
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
282 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
283 @ExpectError("Method signature (VirtualFrame, int) does not match to the expected signature:%")
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
284 int doInt(@SuppressWarnings("unused") VirtualFrame frame, int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
285 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
286 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
287 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
288
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
289 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
290 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
291 abstract static class ExecuteWithFrameError3 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
292
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
293 abstract Object executeFrame(VirtualFrame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
294
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
295 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
296 @ExpectError("Method signature (MaterializedFrame, int) does not match to the expected signature:%")
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
297 int doInt(@SuppressWarnings("unused") MaterializedFrame frame, int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
298 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
299 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
300 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
301
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
302 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
303 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
304 @ExpectError("Invalid inconsistent frame types [MaterializedFrame, VirtualFrame] found for the declared execute methods.%")
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
305 abstract static class ExecuteWithFrameError4 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
306
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
307 abstract Object execute(VirtualFrame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
308
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
309 abstract int executeInt(MaterializedFrame frame) throws UnexpectedResultException;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
310
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
311 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
312 int doInt(int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
313 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
314 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
315 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
316
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
317 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
318 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
319 abstract static class ExecuteWithFrameError5 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
320
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
321 abstract Object execute();
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
322
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
323 abstract int executeInt(MaterializedFrame frame) throws UnexpectedResultException;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
324
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
325 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
326 int doInt(int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
327 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
328 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
329 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
330
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
331 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
332 abstract static class ChildVirtualFrame extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
333 abstract Object execute(VirtualFrame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
334 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
335
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
336 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
337 abstract static class ChildMaterializedFrame extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
338 abstract Object execute(MaterializedFrame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
339 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
340
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
341 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
342 abstract static class ChildFrame extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
343 abstract Object execute(Frame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
344 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
345
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
346 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
347 @NodeChild(value = "a", type = ChildNoFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
348 abstract static class ExecuteChildFrame1 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
349
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
350 abstract Object execute(VirtualFrame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
351
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
352 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
353 int doInt(int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
354 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
355 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
356 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
357
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
358 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
359 @NodeChild(value = "a", type = ChildFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
360 abstract static class ExecuteChildFrame2 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
361
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
362 abstract Object execute(VirtualFrame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
363
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
364 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
365 int doInt(int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
366 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
367 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
368 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
369
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
370 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
371 @NodeChild(value = "a", type = ChildFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
372 abstract static class ExecuteChildFrame3 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
373
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
374 abstract Object execute(MaterializedFrame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
375
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
376 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
377 int doInt(int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
378 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
379 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
380 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
381
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
382 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
383 @NodeChild(value = "a", type = ChildFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
384 abstract static class ExecuteChildFrame4 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
385
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
386 abstract Object execute(Frame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
387
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
388 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
389 int doInt(int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
390 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
391 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
392 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
393
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
394 @ExpectError("No generic execute method found with 0 evaluated arguments for node type ChildVirtualFrame and frame types [com.oracle.truffle.api.frame.Frame].")
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
395 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
396 @NodeChild(value = "a", type = ChildVirtualFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
397 abstract static class ExecuteChildFrameError1 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
398
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
399 abstract Object execute(Frame frame);
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
400
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
401 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
402 int doInt(int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
403 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
404 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
405 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
406
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
407 @ExpectError("No generic execute method found with 0 evaluated arguments for node type ChildFrame and frame types [].")
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
408 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
409 @NodeChild(value = "a", type = ChildFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
410 abstract static class ExecuteChildFrameError2 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
411
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
412 abstract Object execute();
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
413
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
414 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
415 int doInt(int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
416 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
417 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
418 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
419
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
420 @ExpectError("No generic execute method found with 0 evaluated arguments for node type ChildVirtualFrame and frame types [].")
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
421 @TypeSystemReference(ExecuteMethodTypes.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
422 @NodeChild(value = "a", type = ChildVirtualFrame.class)
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
423 abstract static class ExecuteChildFrameError3 extends Node {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
424
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
425 abstract Object execute();
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
426
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
427 @Specialization
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
428 int doInt(int a) {
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
429 return a;
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
430 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
431 }
c0fb70634640 Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
Christian Humer <christian.humer@gmail.com>
parents: 18775
diff changeset
432
18775
a069a87b9a02 Truffle-DSL: Added tests and verification of overridable generic execute methods.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
433 }