Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/TruffleTypes.java @ 9220:97ad6d3e7557
Codegen API changes. Executed child nodes are now defined using @NodeChildren instead of fields.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Sat, 20 Apr 2013 12:16:22 +0200 |
parents | 0905d796944a |
children | 07f8d136a05e |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/TruffleTypes.java Tue Apr 16 11:03:40 2013 +0200 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/TruffleTypes.java Sat Apr 20 12:16:22 2013 +0200 @@ -43,8 +43,8 @@ private final TypeMirror nodeArray; private final TypeMirror unexpectedValueException; private final TypeMirror frame; - private final TypeMirror stableAnnotation; - private final TypeMirror contentStableAnnotation; + private final DeclaredType childAnnotation; + private final DeclaredType childrenAnnotation; private final TypeMirror typeConversion; private final TypeMirror truffleIntrinsics; @@ -55,8 +55,8 @@ nodeArray = context.getEnvironment().getTypeUtils().getArrayType(node); unexpectedValueException = getRequired(context, UnexpectedResultException.class); frame = getRequired(context, VirtualFrame.class); - stableAnnotation = getRequired(context, Child.class); - contentStableAnnotation = getRequired(context, Children.class); + childAnnotation = getRequired(context, Child.class); + childrenAnnotation = getRequired(context, Children.class); typeConversion = getRequired(context, TypeConversion.class); truffleIntrinsics = getRequired(context, TruffleIntrinsics.class); } @@ -73,12 +73,12 @@ return false; } - private TypeMirror getRequired(ProcessorContext context, Class clazz) { + private DeclaredType getRequired(ProcessorContext context, Class clazz) { TypeMirror type = context.getType(clazz); if (type == null) { errors.add(String.format("Could not find required type: %s", clazz.getSimpleName())); } - return type; + return (DeclaredType) type; } public TypeMirror getTruffleIntrinsics() { @@ -105,11 +105,11 @@ return unexpectedValueException; } - public TypeMirror getStableAnnotation() { - return stableAnnotation; + public DeclaredType getChildAnnotation() { + return childAnnotation; } - public TypeMirror getContentStableAnnotation() { - return contentStableAnnotation; + public DeclaredType getChildrenAnnotation() { + return childrenAnnotation; } }