comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/TruffleTypes.java @ 9346:52fde777a605

Implemented improvements to the generated source code.
author Christian Humer <christian.humer@gmail.com>
date Fri, 26 Apr 2013 22:43:37 +0200
parents 2a4b57f02fb4
children 0e4db5ee0695
comparison
equal deleted inserted replaced
9345:0a8bf24d660a 9346:52fde777a605
46 private final TypeMirror assumption; 46 private final TypeMirror assumption;
47 private final TypeMirror invalidAssumption; 47 private final TypeMirror invalidAssumption;
48 private final DeclaredType childAnnotation; 48 private final DeclaredType childAnnotation;
49 private final DeclaredType childrenAnnotation; 49 private final DeclaredType childrenAnnotation;
50 private final TypeMirror compilerDirectives; 50 private final TypeMirror compilerDirectives;
51 private final TypeMirror compilerAsserts;
51 52
52 private final List<String> errors = new ArrayList<>(); 53 private final List<String> errors = new ArrayList<>();
53 54
54 public TruffleTypes(ProcessorContext context) { 55 public TruffleTypes(ProcessorContext context) {
55 node = getRequired(context, Node.class); 56 node = getRequired(context, Node.class);
57 unexpectedValueException = getRequired(context, UnexpectedResultException.class); 58 unexpectedValueException = getRequired(context, UnexpectedResultException.class);
58 frame = getRequired(context, VirtualFrame.class); 59 frame = getRequired(context, VirtualFrame.class);
59 childAnnotation = getRequired(context, Child.class); 60 childAnnotation = getRequired(context, Child.class);
60 childrenAnnotation = getRequired(context, Children.class); 61 childrenAnnotation = getRequired(context, Children.class);
61 compilerDirectives = getRequired(context, CompilerDirectives.class); 62 compilerDirectives = getRequired(context, CompilerDirectives.class);
63 compilerAsserts = getRequired(context, CompilerAsserts.class);
62 assumption = getRequired(context, Assumption.class); 64 assumption = getRequired(context, Assumption.class);
63 invalidAssumption = getRequired(context, InvalidAssumptionException.class); 65 invalidAssumption = getRequired(context, InvalidAssumptionException.class);
64 } 66 }
65 67
66 public boolean verify(ProcessorContext context, Element element, AnnotationMirror mirror) { 68 public boolean verify(ProcessorContext context, Element element, AnnotationMirror mirror) {
116 } 118 }
117 119
118 public DeclaredType getChildrenAnnotation() { 120 public DeclaredType getChildrenAnnotation() {
119 return childrenAnnotation; 121 return childrenAnnotation;
120 } 122 }
123
124 public TypeMirror getCompilerAsserts() {
125 return compilerAsserts;
126 }
121 } 127 }