equal
deleted
inserted
replaced
65 public class Types { |
65 public class Types { |
66 protected static final Context.Key<Types> typesKey = |
66 protected static final Context.Key<Types> typesKey = |
67 new Context.Key<Types>(); |
67 new Context.Key<Types>(); |
68 |
68 |
69 final Symtab syms; |
69 final Symtab syms; |
70 final Name.Table names; |
70 final Names names; |
71 final boolean allowBoxing; |
71 final boolean allowBoxing; |
72 final ClassReader reader; |
72 final ClassReader reader; |
73 final Source source; |
73 final Source source; |
74 final Check chk; |
74 final Check chk; |
75 List<Warner> warnStack = List.nil(); |
75 List<Warner> warnStack = List.nil(); |
84 } |
84 } |
85 |
85 |
86 protected Types(Context context) { |
86 protected Types(Context context) { |
87 context.put(typesKey, this); |
87 context.put(typesKey, this); |
88 syms = Symtab.instance(context); |
88 syms = Symtab.instance(context); |
89 names = Name.Table.instance(context); |
89 names = Names.instance(context); |
90 allowBoxing = Source.instance(context).allowBoxing(); |
90 allowBoxing = Source.instance(context).allowBoxing(); |
91 reader = ClassReader.instance(context); |
91 reader = ClassReader.instance(context); |
92 source = Source.instance(context); |
92 source = Source.instance(context); |
93 chk = Check.instance(context); |
93 chk = Check.instance(context); |
94 capturedName = names.fromString("<captured wildcard>"); |
94 capturedName = names.fromString("<captured wildcard>"); |
2211 switch(t.tag) { |
2211 switch(t.tag) { |
2212 case CLASS: { |
2212 case CLASS: { |
2213 ClassType cls = (ClassType)t; |
2213 ClassType cls = (ClassType)t; |
2214 if (cls.rank_field < 0) { |
2214 if (cls.rank_field < 0) { |
2215 Name fullname = cls.tsym.getQualifiedName(); |
2215 Name fullname = cls.tsym.getQualifiedName(); |
2216 if (fullname == fullname.table.java_lang_Object) |
2216 if (fullname == names.java_lang_Object) |
2217 cls.rank_field = 0; |
2217 cls.rank_field = 0; |
2218 else { |
2218 else { |
2219 int r = rank(supertype(cls)); |
2219 int r = rank(supertype(cls)); |
2220 for (List<Type> l = interfaces(cls); |
2220 for (List<Type> l = interfaces(cls); |
2221 l.nonEmpty(); |
2221 l.nonEmpty(); |