Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/SlowPathTest.java @ 12635:ba6593e52d22
Truffle-DSL: fixed additional wrong @SlowPath usage on generic. (GRAAL-490 #resolve)
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 28 Oct 2013 11:06:51 +0100 |
parents | 980db6c0bcd3 |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/SlowPathTest.java Sun Oct 27 19:59:00 2013 +0100 +++ b/graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/SlowPathTest.java Mon Oct 28 11:06:51 2013 +0100 @@ -28,6 +28,7 @@ import com.oracle.truffle.api.dsl.*; import com.oracle.truffle.api.dsl.test.SlowPathTestFactory.SlowPathOnGeneric0Factory; import com.oracle.truffle.api.dsl.test.SlowPathTestFactory.SlowPathOnGeneric1Factory; +import com.oracle.truffle.api.dsl.test.SlowPathTestFactory.SlowPathOnGeneric2Factory; import com.oracle.truffle.api.dsl.test.TypeSystemTest.ValueNode; import com.oracle.truffle.api.frame.*; import com.oracle.truffle.api.nodes.*; @@ -69,4 +70,27 @@ } + @Test + public void testSlowPathOnGeneric2() throws NoSuchMethodException, SecurityException { + Node node = SlowPathOnGeneric2Factory.create(null); + Assert.assertNull(node.getClass().getSuperclass().getDeclaredMethod("executeGeneric0", VirtualFrame.class, Object.class).getAnnotation(SlowPath.class)); + } + + @NodeChild + abstract static class SlowPathOnGeneric2 extends ValueNode { + + @Specialization(order = 0) + @SuppressWarnings("unused") + Object doObject0(int value0) { + throw new AssertionError(); + } + + @Specialization(order = 1) + @SuppressWarnings("unused") + Object doObject1(VirtualFrame frame, String value0) { + throw new AssertionError(); + } + + } + }