Mercurial > hg > truffle
changeset 10444:ad48251630cd
Fixed GRAAL-321.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 18 Jun 2013 10:11:28 +0200 |
parents | 8b2573c8d47f |
children | f158703c308c |
files | graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeParser.java |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeParser.java Tue Jun 18 10:10:54 2013 +0200 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeParser.java Tue Jun 18 10:11:28 2013 +0200 @@ -42,7 +42,7 @@ public class NodeParser extends TemplateParser<NodeData> { public static final List<Class<? extends Annotation>> ANNOTATIONS = Arrays.asList(Generic.class, TypeSystemReference.class, ShortCircuit.class, Specialization.class, SpecializationListener.class, - ExecuteChildren.class, NodeClass.class, NodeChild.class, NodeChildren.class, NodeId.class); + NodeClass.class, NodeChild.class, NodeChildren.class, NodeId.class); private Map<String, NodeData> parsedNodes; @@ -754,8 +754,12 @@ } List<AnnotationMirror> children = Utils.collectAnnotations(context, nodeChildrenMirror, "value", type, NodeChild.class); + int index = 0; for (AnnotationMirror childMirror : children) { String name = Utils.getAnnotationValue(String.class, childMirror, "value"); + if (name.equals("")) { + name = "child" + index; + } Cardinality cardinality = Cardinality.ONE; @@ -785,7 +789,9 @@ if (fieldNodeData == null) { nodeChild.addError("Node type '%s' is invalid or not a valid Node.", Utils.getQualifiedName(childType)); } + } + index++; } List<NodeChildData> filteredChildren = new ArrayList<>();