Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/GuardsTest.java @ 13528:5a0c694ef735
Truffle-DSL: Removed API classes NodeId, NodeContainer and SpecializationListener.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 07 Jan 2014 18:52:32 +0100 |
parents | d6a5ab791b0d |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/GuardsTest.java Tue Jan 07 12:22:47 2014 +0100 +++ b/graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/GuardsTest.java Tue Jan 07 18:52:32 2014 +0100 @@ -38,8 +38,6 @@ import com.oracle.truffle.api.dsl.test.GuardsTestFactory.TestGuardResolve1Factory; import com.oracle.truffle.api.dsl.test.GuardsTestFactory.TestGuardResolve2Factory; import com.oracle.truffle.api.dsl.test.GuardsTestFactory.TestGuardResolve3Factory; -import com.oracle.truffle.api.dsl.test.NodeContainerTest.Str; -import com.oracle.truffle.api.dsl.test.NodeContainerTest.StrBase; import com.oracle.truffle.api.dsl.test.TypeSystemTest.Abstract; import com.oracle.truffle.api.dsl.test.TypeSystemTest.BExtendsAbstract; import com.oracle.truffle.api.dsl.test.TypeSystemTest.CExtendsAbstract; @@ -124,18 +122,18 @@ public void testGuardWithBaseClass() { TestRootNode<?> root = createRoot(GuardWithBaseClassFactory.getInstance()); - assertEquals(42, executeWith(root, new Str("42"))); + assertEquals(42, executeWith(root, new BExtendsAbstract())); } @NodeChild("expression") public abstract static class GuardWithBaseClass extends ValueNode { - boolean baseGuard(StrBase base) { + boolean baseGuard(Abstract base) { return true; } @Specialization(guards = "baseGuard") - int doSpecialized(Str value0) { + int doSpecialized(BExtendsAbstract value0) { return 42; } } @@ -227,7 +225,7 @@ @Test public void testGuardResolve2() { TestRootNode<?> root = createRoot(TestGuardResolve2Factory.getInstance()); - assertEquals(42, executeWith(root, new Str(""))); + assertEquals(42, executeWith(root, new BExtendsAbstract())); } @NodeChild("expression") @@ -237,12 +235,12 @@ return false; } - boolean guard(StrBase primitive) { + boolean guard(Abstract primitive) { return true; } @Specialization(guards = "guard") - int doSpecialized(Str value0) { + int doSpecialized(BExtendsAbstract value0) { return 42; } } @@ -251,7 +249,7 @@ public void testGuardResolve3() { TestRootNode<?> root = createRoot(TestGuardResolve3Factory.getInstance()); - assertEquals(42, executeWith(root, new Str(""))); + assertEquals(42, executeWith(root, new BExtendsAbstract())); } @NodeChild("expression") @@ -261,16 +259,16 @@ return false; } - boolean guard(StrBase primitive) { + boolean guard(Abstract primitive) { return false; } - boolean guard(Str primitive) { + boolean guard(BExtendsAbstract primitive) { return true; } @Specialization(guards = "guard") - int doSpecialized(Str value0) { + int doSpecialized(BExtendsAbstract value0) { return 42; } } @@ -278,12 +276,12 @@ @NodeChild("expression") public abstract static class TestGuardResolve4 extends ValueNode { - boolean guard(StrBase primitive) { + boolean guard(Abstract primitive) { return false; } @Specialization(guards = "guard") - int doSpecialized(Str value0) { + int doSpecialized(BExtendsAbstract value0) { return 42; } }