comparison graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/NodeChildTest.java @ 20938:18c0f02fa4d2

Truffle-DSL: make type systems optional.
author Christian Humer <christian.humer@gmail.com>
date Tue, 14 Apr 2015 15:12:48 +0200
parents 71991b7a0f14
children
comparison
equal deleted inserted replaced
20937:37ea76052733 20938:18c0f02fa4d2
69 @NodeChildren({@NodeChild("child0"), @NodeChild("child1")}) 69 @NodeChildren({@NodeChild("child0"), @NodeChild("child1")})
70 abstract static class Base2Node extends ValueNode { 70 abstract static class Base2Node extends ValueNode {
71 71
72 } 72 }
73 73
74 @ExpectError("Not enough child node declarations found. Please annotate the node class with addtional @NodeChild annotations or remove all execute methods that do not provide all evaluated values. "
75 + "The following execute methods do not provide all evaluated values for the expected signature size 3:%")
74 @NodeChildren({@NodeChild(value = "child2", type = ValueNode.class)}) 76 @NodeChildren({@NodeChild(value = "child2", type = ValueNode.class)})
75 abstract static class Child2Node extends Base1Node { 77 abstract static class Child2Node extends Base1Node {
76 78
77 // TODO this is an error to fix
78 @ExpectError("Method signature (int, int, int) does not match to the expected signature:%") 79 @ExpectError("Method signature (int, int, int) does not match to the expected signature:%")
79 @Specialization 80 @Specialization
80 int intField(int child0, int child1, int child2) { 81 int intField(int child0, int child1, int child2) {
81 return child0 + child1 + child2; 82 return child0 + child1 + child2;
82 } 83 }