Chromium Code Reviews| Index: pkg/compiler/lib/src/dart2js.dart |
| diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart |
| index 5dffdf7dee09a0d11dbb8c9c5c441549ef74e87b..c1022590e193b302c8ca0c8cdd9d63073e8695ab 100644 |
| --- a/pkg/compiler/lib/src/dart2js.dart |
| +++ b/pkg/compiler/lib/src/dart2js.dart |
| @@ -108,7 +108,7 @@ Future<api.CompilationResult> compile(List<String> argv) { |
| Uri libraryRoot = currentDirectory; |
| Uri out = currentDirectory.resolve('out.js'); |
| Uri sourceMapOut = currentDirectory.resolve('out.js.map'); |
| - Uri resolutionInput; |
| + List<Uri> resolutionInputs; |
| Uri packageConfig = null; |
| Uri packageRoot = null; |
| List<String> options = new List<String>(); |
| @@ -190,8 +190,12 @@ Future<api.CompilationResult> compile(List<String> argv) { |
| } |
| void setResolutionInput(String argument) { |
| - resolutionInput = |
| - currentDirectory.resolve(extractPath(argument, isDirectory: false)); |
| + resolutionInputs = <Uri>[]; |
| + String parts = extractParameter(argument); |
| + for (String part in parts.split(',')) { |
| + resolutionInputs.add( |
| + currentDirectory.resolve(nativeToUriPath(part))); |
| + } |
| } |
| void setResolveOnly(String argument) { |
| @@ -525,7 +529,7 @@ Future<api.CompilationResult> compile(List<String> argv) { |
| packageRoot: packageRoot, |
| packageConfig: packageConfig, |
| packagesDiscoveryProvider: findPackages, |
| - resolutionInput: resolutionInput, |
| + resolutionInputs: resolutionInputs, |
| resolutionOutput: resolutionOutput, |
| options: options, |
| environment: environment); |
| @@ -834,6 +838,8 @@ void batchMain(List<String> batchArguments) { |
| final bool USE_SERIALIZED_DART_CORE = |
| Platform.environment['USE_SERIALIZED_DART_CORE'] == 'true'; |
| +final Uri _SERIALIZED_URI = Uri.parse('file:fake.data'); |
|
Siggi Cherem (dart-lang)
2016/05/24 18:08:14
+dartdoc just to remember that this URI is a mock
Johnni Winther
2016/05/25 07:54:46
Done.
|
| + |
| void _useSerializedDataForDartCore(CompileFunc oldCompileFunc) { |
| String serializedData; |
| @@ -844,7 +850,8 @@ void _useSerializedDataForDartCore(CompileFunc oldCompileFunc) { |
| api.CompilerOutput compilerOutput) async { |
| CompilerImpl compiler = new CompilerImpl( |
| compilerInput, compilerOutput, compilerDiagnostics, compilerOptions); |
| - compiler.serialization.deserializeFromText(serializedData); |
| + compiler.serialization.deserializeFromText( |
| + _SERIALIZED_URI, serializedData); |
| return compiler.run(compilerOptions.entryPoint).then((bool success) { |
| return new api.CompilationResult(compiler, isSuccess: success); |
| }); |
| @@ -865,7 +872,7 @@ void _useSerializedDataForDartCore(CompileFunc oldCompileFunc) { |
| packagesDiscoveryProvider: |
| compilerOptions.packagesDiscoveryProvider, |
| environment: compilerOptions.environment, |
| - resolutionOutput: Uri.parse('file:fake.data'), |
| + resolutionOutput: _SERIALIZED_URI, |
| options: [Flags.resolveOnly]), |
| compilerInput, |
| compilerDiagnostics, |