Chromium Code Reviews| Index: compiler/java/com/google/dart/compiler/DartCompiler.java |
| diff --git a/compiler/java/com/google/dart/compiler/DartCompiler.java b/compiler/java/com/google/dart/compiler/DartCompiler.java |
| index 6968b104eb511739e82b33fe39ed6741d0e5fe60..d6a1ba3a292edfea910996da636494eb9b8aeb8c 100644 |
| --- a/compiler/java/com/google/dart/compiler/DartCompiler.java |
| +++ b/compiler/java/com/google/dart/compiler/DartCompiler.java |
| @@ -152,13 +152,13 @@ public class DartCompiler { |
| embeddedLibraries.add(coreLibrarySource); |
| incremental = config.incremental(); |
| - usePrecompiledDartLibs = true; |
| + usePrecompiledDartLibs = false; |
|
ahe
2012/03/20 21:34:09
I don't think anyone is using this feature anymore
zundel
2012/03/25 16:39:02
Done.
|
| } |
| - |
| + |
| void addResolvedLibraries(Map<URI, LibraryUnit> resolvedLibraries) { |
| libraries.putAll(resolvedLibraries); |
| } |
| - |
| + |
| Map<URI, LibraryUnit> getLibraries() { |
| return libraries; |
| } |
| @@ -851,8 +851,8 @@ public class DartCompiler { |
| } |
| /** |
| - * Selectively compile a library. Use supplied libraries and ASTs when available. |
| - * This allows programming tools to provide customized ASTs for code that is currently being |
| + * Selectively compile a library. Use supplied libraries and ASTs when available. |
| + * This allows programming tools to provide customized ASTs for code that is currently being |
| * edited, and may not compile correctly. |
| */ |
| private static class SelectiveCompiler extends Compiler { |
| @@ -862,14 +862,14 @@ public class DartCompiler { |
| private Collection<LibraryUnit> librariesToProcess; |
| private SelectiveCompiler(LibrarySource app, Map<URI, LibraryUnit> resolvedLibraries, |
| - Map<URI,DartUnit> parsedUnits, CompilerConfiguration config, |
| + Map<URI,DartUnit> parsedUnits, CompilerConfiguration config, |
| DartCompilerMainContext context) { |
| super(app, Collections.<LibrarySource>emptyList(), config, context); |
| this.resolvedLibraries = resolvedLibraries; |
| this.parsedUnits = parsedUnits; |
| addResolvedLibraries(resolvedLibraries); |
| } |
| - |
| + |
| @Override |
| Collection<LibraryUnit> getLibrariesToProcess() { |
| if (librariesToProcess == null) { |
| @@ -911,20 +911,31 @@ public class DartCompiler { |
| return compilerOptions; |
| } |
| - public static void main(String[] args) { |
| + public static void main(final String[] topArgs) { |
| Tracer.init(); |
| - CompilerOptions topCompilerOptions = processCommandLineOptions(args); |
| + CompilerOptions topCompilerOptions = processCommandLineOptions(topArgs); |
| boolean result = false; |
| try { |
| if (topCompilerOptions.shouldBatch()) { |
| - if (args.length > 1) { |
| + if (topArgs.length > 1) { |
| System.err.println("(Extra arguments specified with -batch ignored.)"); |
| } |
| - UnitTestBatchRunner.runAsBatch(args, new Invocation() { |
| + UnitTestBatchRunner.runAsBatch(topArgs, new Invocation() { |
| @Override |
| - public boolean invoke(String[] args) throws Throwable { |
| - CompilerOptions compilerOptions = processCommandLineOptions(args); |
| + public boolean invoke(String[] lineArgs) throws Throwable { |
| + List<String> allArgs = new ArrayList<String>(); |
| + for (String arg: topArgs) { |
| + if (!arg.equals("-batch")) { |
| + allArgs.add(arg); |
| + } |
| + } |
| + for (String arg: lineArgs) { |
| + allArgs.add(arg); |
| + } |
| + |
| + CompilerOptions compilerOptions = processCommandLineOptions( |
| + allArgs.toArray(new String[allArgs.size()])); |
| if (compilerOptions.shouldBatch()) { |
| System.err.println("-batch ignored: Already in batch mode."); |
| } |