Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/examples/FunctionCall.java @ 22157:dc83cc1f94f2
Using fully qualified imports
author | Jaroslav Tulach <jaroslav.tulach@oracle.com> |
---|---|
date | Wed, 16 Sep 2015 11:33:22 +0200 |
parents | 9c8c0937da41 |
children | 14e6dfb1ef05 |
comparison
equal
deleted
inserted
replaced
22156:50056a161d7f | 22157:dc83cc1f94f2 |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.oracle.truffle.api.dsl.test.examples; | 23 package com.oracle.truffle.api.dsl.test.examples; |
24 | 24 |
25 import static com.oracle.truffle.api.dsl.test.examples.ExampleNode.*; | 25 import com.oracle.truffle.api.CallTarget; |
26 import static org.junit.Assert.*; | 26 import com.oracle.truffle.api.CompilerAsserts; |
27 | 27 import com.oracle.truffle.api.dsl.Cached; |
28 import org.junit.*; | 28 import com.oracle.truffle.api.dsl.Specialization; |
29 | 29 import static com.oracle.truffle.api.dsl.test.examples.ExampleNode.createArguments; |
30 import com.oracle.truffle.api.*; | 30 import static com.oracle.truffle.api.dsl.test.examples.ExampleNode.createDummyTarget; |
31 import com.oracle.truffle.api.dsl.*; | 31 import static com.oracle.truffle.api.dsl.test.examples.ExampleNode.createTarget; |
32 import com.oracle.truffle.api.dsl.test.examples.FunctionCallFactory.FunctionCallNodeGen; | 32 import com.oracle.truffle.api.dsl.test.examples.FunctionCallFactory.FunctionCallNodeGen; |
33 import com.oracle.truffle.api.frame.*; | 33 import com.oracle.truffle.api.frame.VirtualFrame; |
34 import com.oracle.truffle.api.nodes.*; | 34 import com.oracle.truffle.api.nodes.DirectCallNode; |
35 import com.oracle.truffle.api.nodes.IndirectCallNode; | |
36 import static org.junit.Assert.assertEquals; | |
37 import org.junit.Test; | |
35 | 38 |
36 /** | 39 /** |
37 * This example illustrates how {@link Cached} can be used to implement function calls that use | 40 * This example illustrates how {@link Cached} can be used to implement function calls that use |
38 * local state for its guards. If there are always distinct Function objects with distinct | 41 * local state for its guards. If there are always distinct Function objects with distinct |
39 * CallTargets then we can use the directCallFunctionGuard specialization. If there are two Function | 42 * CallTargets then we can use the directCallFunctionGuard specialization. If there are two Function |