equal
deleted
inserted
replaced
49 import com.sun.source.util.TaskListener; |
49 import com.sun.source.util.TaskListener; |
50 |
50 |
51 import com.sun.tools.javac.file.JavacFileManager; |
51 import com.sun.tools.javac.file.JavacFileManager; |
52 import com.sun.tools.javac.util.*; |
52 import com.sun.tools.javac.util.*; |
53 import com.sun.tools.javac.code.*; |
53 import com.sun.tools.javac.code.*; |
|
54 import com.sun.tools.javac.code.Lint.LintCategory; |
54 import com.sun.tools.javac.code.Symbol.*; |
55 import com.sun.tools.javac.code.Symbol.*; |
55 import com.sun.tools.javac.tree.*; |
56 import com.sun.tools.javac.tree.*; |
56 import com.sun.tools.javac.tree.JCTree.*; |
57 import com.sun.tools.javac.tree.JCTree.*; |
57 import com.sun.tools.javac.parser.*; |
58 import com.sun.tools.javac.parser.*; |
58 import com.sun.tools.javac.comp.*; |
59 import com.sun.tools.javac.comp.*; |
367 genEndPos = options.isSet(XJCOV) || |
368 genEndPos = options.isSet(XJCOV) || |
368 context.get(DiagnosticListener.class) != null; |
369 context.get(DiagnosticListener.class) != null; |
369 devVerbose = options.isSet("dev"); |
370 devVerbose = options.isSet("dev"); |
370 processPcks = options.isSet("process.packages"); |
371 processPcks = options.isSet("process.packages"); |
371 werror = options.isSet(WERROR); |
372 werror = options.isSet(WERROR); |
|
373 |
|
374 if (source.compareTo(Source.DEFAULT) < 0) { |
|
375 if (options.isUnset(XLINT_CUSTOM, "-" + LintCategory.OPTIONS.option)) { |
|
376 if (fileManager instanceof BaseFileManager) { |
|
377 if (((BaseFileManager) fileManager).isDefaultBootClassPath()) |
|
378 log.warning(LintCategory.OPTIONS, "source.no.bootclasspath", source.name); |
|
379 } |
|
380 } |
|
381 } |
372 |
382 |
373 verboseCompilePolicy = options.isSet("verboseCompilePolicy"); |
383 verboseCompilePolicy = options.isSet("verboseCompilePolicy"); |
374 |
384 |
375 if (attrParseOnly) |
385 if (attrParseOnly) |
376 compilePolicy = CompilePolicy.ATTR_ONLY; |
386 compilePolicy = CompilePolicy.ATTR_ONLY; |
781 if (hasBeenUsed) |
791 if (hasBeenUsed) |
782 throw new AssertionError("attempt to reuse JavaCompiler"); |
792 throw new AssertionError("attempt to reuse JavaCompiler"); |
783 hasBeenUsed = true; |
793 hasBeenUsed = true; |
784 |
794 |
785 start_msec = now(); |
795 start_msec = now(); |
|
796 |
786 try { |
797 try { |
787 initProcessAnnotations(processors); |
798 initProcessAnnotations(processors); |
788 |
799 |
789 // These method calls must be chained to avoid memory leaks |
800 // These method calls must be chained to avoid memory leaks |
790 delegateCompiler = |
801 delegateCompiler = |
795 delegateCompiler.compile2(); |
806 delegateCompiler.compile2(); |
796 delegateCompiler.close(); |
807 delegateCompiler.close(); |
797 elapsed_msec = delegateCompiler.elapsed_msec; |
808 elapsed_msec = delegateCompiler.elapsed_msec; |
798 } catch (Abort ex) { |
809 } catch (Abort ex) { |
799 if (devVerbose) |
810 if (devVerbose) |
800 ex.printStackTrace(); |
811 ex.printStackTrace(System.err); |
801 } finally { |
812 } finally { |
802 if (procEnvImpl != null) |
813 if (procEnvImpl != null) |
803 procEnvImpl.close(); |
814 procEnvImpl.close(); |
804 } |
815 } |
805 } |
816 } |
839 default: |
850 default: |
840 assert false: "unknown compile policy"; |
851 assert false: "unknown compile policy"; |
841 } |
852 } |
842 } catch (Abort ex) { |
853 } catch (Abort ex) { |
843 if (devVerbose) |
854 if (devVerbose) |
844 ex.printStackTrace(); |
855 ex.printStackTrace(System.err); |
845 } |
856 } |
846 |
857 |
847 if (verbose) { |
858 if (verbose) { |
848 elapsed_msec = elapsed(start_msec); |
859 elapsed_msec = elapsed(start_msec); |
849 printVerbose("total", Long.toString(elapsed_msec)); |
860 printVerbose("total", Long.toString(elapsed_msec)); |