Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/ExecuteEvaluatedTest.java @ 18776:c0fb70634640
Truffle-DSL: support for frame types Frame, MaterializedFrame. Added validation for frame type consistency. Some refactorings along the way.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 05 Jan 2015 01:31:08 +0100 |
parents | a665483c3881 |
children | 906367e494ca |
comparison
equal
deleted
inserted
replaced
18775:a069a87b9a02 | 18776:c0fb70634640 |
---|---|
145 Assert.assertEquals(42, root.getNode().execute1(null)); | 145 Assert.assertEquals(42, root.getNode().execute1(null)); |
146 } | 146 } |
147 | 147 |
148 abstract static class TestEvaluatedVarArgs0 extends ChildrenNode { | 148 abstract static class TestEvaluatedVarArgs0 extends ChildrenNode { |
149 | 149 |
150 @Override | |
151 public final Object execute(VirtualFrame frame) { | |
152 return execute1(frame); | |
153 } | |
154 | |
150 public abstract Object execute1(VirtualFrame frame, Object... value); | 155 public abstract Object execute1(VirtualFrame frame, Object... value); |
151 | 156 |
152 @Specialization | 157 @Specialization |
153 int call() { | 158 int call() { |
154 return 42; | 159 return 42; |
245 Assert.assertEquals(42, root.getNode().execute1(null)); | 250 Assert.assertEquals(42, root.getNode().execute1(null)); |
246 } | 251 } |
247 | 252 |
248 abstract static class TestEvaluatedVarArgs5 extends ValueNode { | 253 abstract static class TestEvaluatedVarArgs5 extends ValueNode { |
249 | 254 |
255 @Override | |
256 public final Object execute(VirtualFrame frame) { | |
257 return execute1(frame); | |
258 } | |
259 | |
250 public abstract Object execute1(VirtualFrame frame, Object... value); | 260 public abstract Object execute1(VirtualFrame frame, Object... value); |
251 | 261 |
252 @Specialization | 262 @Specialization |
253 int call() { | 263 int call() { |
254 return 42; | 264 return 42; |