Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/typesystem/TypeSystemData.java @ 11467:43eab069ca9b
Truffle-DSL: improved error recovery of type systems and improved error testability infrastructure.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 29 Aug 2013 19:19:00 +0200 |
parents | 79041ab43660 |
children | 2fb276f5e3e9 |
comparison
equal
deleted
inserted
replaced
11466:4830676526e3 | 11467:43eab069ca9b |
---|---|
34 | 34 |
35 private List<TypeData> types; | 35 private List<TypeData> types; |
36 private List<TypeMirror> primitiveTypeMirrors = new ArrayList<>(); | 36 private List<TypeMirror> primitiveTypeMirrors = new ArrayList<>(); |
37 private List<TypeMirror> boxedTypeMirrors = new ArrayList<>(); | 37 private List<TypeMirror> boxedTypeMirrors = new ArrayList<>(); |
38 | 38 |
39 private List<TypeCastData> casts; | |
40 private List<TypeCheckData> checks; | |
41 | |
39 private TypeMirror genericType; | 42 private TypeMirror genericType; |
40 private TypeData voidType; | 43 private TypeData voidType; |
41 | 44 |
42 public TypeSystemData(TypeElement templateType, AnnotationMirror annotation) { | 45 public TypeSystemData(TypeElement templateType, AnnotationMirror annotation) { |
43 super(templateType, null, annotation); | 46 super(templateType, null, annotation); |
56 boxedTypeMirrors.add(typeData.getBoxedType()); | 59 boxedTypeMirrors.add(typeData.getBoxedType()); |
57 } | 60 } |
58 } | 61 } |
59 } | 62 } |
60 | 63 |
64 public void setCasts(List<TypeCastData> casts) { | |
65 this.casts = casts; | |
66 } | |
67 | |
68 public void setChecks(List<TypeCheckData> checks) { | |
69 this.checks = checks; | |
70 } | |
71 | |
61 void setGenericType(TypeMirror genericType) { | 72 void setGenericType(TypeMirror genericType) { |
62 this.genericType = genericType; | 73 this.genericType = genericType; |
63 } | 74 } |
64 | 75 |
65 void setVoidType(TypeData voidType) { | 76 void setVoidType(TypeData voidType) { |
69 @Override | 80 @Override |
70 protected List<MessageContainer> findChildContainers() { | 81 protected List<MessageContainer> findChildContainers() { |
71 List<MessageContainer> sinks = new ArrayList<>(); | 82 List<MessageContainer> sinks = new ArrayList<>(); |
72 if (types != null) { | 83 if (types != null) { |
73 sinks.addAll(types); | 84 sinks.addAll(types); |
85 } | |
86 if (checks != null) { | |
87 sinks.addAll(checks); | |
88 } | |
89 if (casts != null) { | |
90 sinks.addAll(casts); | |
74 } | 91 } |
75 return sinks; | 92 return sinks; |
76 } | 93 } |
77 | 94 |
78 public boolean isGeneric(TypeMirror type) { | 95 public boolean isGeneric(TypeMirror type) { |