equal
deleted
inserted
replaced
41 import com.sun.tools.javac.code.Attribute.RetentionPolicy; |
41 import com.sun.tools.javac.code.Attribute.RetentionPolicy; |
42 import com.sun.tools.javac.code.Directive.*; |
42 import com.sun.tools.javac.code.Directive.*; |
43 import com.sun.tools.javac.code.Symbol.*; |
43 import com.sun.tools.javac.code.Symbol.*; |
44 import com.sun.tools.javac.code.Type.*; |
44 import com.sun.tools.javac.code.Type.*; |
45 import com.sun.tools.javac.code.Types.UniqueType; |
45 import com.sun.tools.javac.code.Types.UniqueType; |
|
46 import com.sun.tools.javac.comp.Check; |
46 import com.sun.tools.javac.file.PathFileObject; |
47 import com.sun.tools.javac.file.PathFileObject; |
47 import com.sun.tools.javac.jvm.Pool.DynamicMethod; |
48 import com.sun.tools.javac.jvm.Pool.DynamicMethod; |
48 import com.sun.tools.javac.jvm.Pool.Method; |
49 import com.sun.tools.javac.jvm.Pool.Method; |
49 import com.sun.tools.javac.jvm.Pool.MethodHandle; |
50 import com.sun.tools.javac.jvm.Pool.MethodHandle; |
50 import com.sun.tools.javac.jvm.Pool.Variable; |
51 import com.sun.tools.javac.jvm.Pool.Variable; |
99 private Source source; |
100 private Source source; |
100 |
101 |
101 /** Type utilities. */ |
102 /** Type utilities. */ |
102 private Types types; |
103 private Types types; |
103 |
104 |
|
105 private Check check; |
|
106 |
104 /** |
107 /** |
105 * If true, class files will be written in module-specific subdirectories |
108 * If true, class files will be written in module-specific subdirectories |
106 * of the CLASS_OUTPUT location. |
109 * of the CLASS_OUTPUT location. |
107 */ |
110 */ |
108 public boolean multiModuleMode; |
111 public boolean multiModuleMode; |
176 names = Names.instance(context); |
179 names = Names.instance(context); |
177 options = Options.instance(context); |
180 options = Options.instance(context); |
178 target = Target.instance(context); |
181 target = Target.instance(context); |
179 source = Source.instance(context); |
182 source = Source.instance(context); |
180 types = Types.instance(context); |
183 types = Types.instance(context); |
|
184 check = Check.instance(context); |
181 fileManager = context.get(JavaFileManager.class); |
185 fileManager = context.get(JavaFileManager.class); |
182 signatureGen = new CWSignatureGenerator(types); |
186 signatureGen = new CWSignatureGenerator(types); |
183 |
187 |
184 verbose = options.isSet(VERBOSE); |
188 verbose = options.isSet(VERBOSE); |
185 genCrt = options.isSet(XJCOV); |
189 genCrt = options.isSet(XJCOV); |
1292 endAttrs(acountIdx, acount); |
1296 endAttrs(acountIdx, acount); |
1293 } |
1297 } |
1294 //where |
1298 //where |
1295 private boolean needsLocalVariableTypeEntry(Type t) { |
1299 private boolean needsLocalVariableTypeEntry(Type t) { |
1296 //a local variable needs a type-entry if its type T is generic |
1300 //a local variable needs a type-entry if its type T is generic |
1297 //(i.e. |T| != T) and if it's not an intersection type (not supported |
1301 //(i.e. |T| != T) and if it's not an non-denotable type (non-denotable |
1298 //in signature attribute grammar) |
1302 // types are not supported in signature attribute grammar!) |
1299 return (!types.isSameType(t, types.erasure(t)) && |
1303 return !types.isSameType(t, types.erasure(t)) && |
1300 !t.isCompound()); |
1304 check.checkDenotable(t); |
1301 } |
1305 } |
1302 |
1306 |
1303 void writeStackMap(Code code) { |
1307 void writeStackMap(Code code) { |
1304 int nframes = code.stackMapBufferSize; |
1308 int nframes = code.stackMapBufferSize; |
1305 if (debugstackmap) System.out.println(" nframes = " + nframes); |
1309 if (debugstackmap) System.out.println(" nframes = " + nframes); |