Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/ParameterSpec.java @ 8237:6b74ffe38183
Implemented support for executing nodes in @Children fields.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Fri, 01 Mar 2013 17:03:57 +0100 |
parents | b891ec348f8a |
children | 0905d796944a |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/ParameterSpec.java Mon Feb 25 20:54:33 2013 +0100 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/ParameterSpec.java Fri Mar 01 17:03:57 2013 +0100 @@ -39,7 +39,8 @@ private final String name; private final TypeMirror[] allowedTypes; private final boolean optional; - private final Cardinality cardinality; + private Cardinality cardinality; + private boolean indexed; public ParameterSpec(String name, TypeMirror[] allowedTypes, boolean optional, Cardinality cardinality) { this.allowedTypes = allowedTypes; @@ -63,6 +64,18 @@ this(name, nodeTypeMirrors(nodeData), optional, cardinality); } + public boolean isIndexed() { + return indexed; + } + + public void setIndexed(boolean indexed) { + this.indexed = indexed; + } + + public void setCardinality(Cardinality cardinality) { + this.cardinality = cardinality; + } + private static TypeMirror[] nodeTypeMirrors(NodeData nodeData) { Set<TypeMirror> typeMirrors = new LinkedHashSet<>(); @@ -95,6 +108,7 @@ for (int i = 0; i < allowedTypes.length; i++) { TypeMirror mirror = allowedTypes[i]; if (Utils.typeEquals(actualType, mirror)) { + return true; } }