Chromium Code Reviews| Index: pkg/compiler/lib/src/library_loader.dart |
| diff --git a/pkg/compiler/lib/src/library_loader.dart b/pkg/compiler/lib/src/library_loader.dart |
| index 2df480edf34e5b481538cd5cb3850320f3e05e26..171fb5fa4acf7be81fce178a4da9bbac397142e7 100644 |
| --- a/pkg/compiler/lib/src/library_loader.dart |
| +++ b/pkg/compiler/lib/src/library_loader.dart |
| @@ -7,9 +7,8 @@ library dart2js.library_loader; |
| import 'dart:async'; |
| import 'common/names.dart' show Uris; |
| -import 'common/tasks.dart' show CompilerTask, GenericTask; |
| +import 'common/tasks.dart' show CompilerTask, Measurer; |
| import 'common.dart'; |
| -import 'compiler.dart' show Compiler; |
| import 'elements/elements.dart' |
| show |
| CompilationUnitElement, |
| @@ -115,8 +114,8 @@ typedef Future<Iterable<LibraryElement>> ReuseLibrariesFunction( |
| * A 'resource URI' is an absolute URI with a scheme supported by the input |
| * provider. For the standard implementation this means a URI with the 'file' |
| * scheme. Readable URIs are converted into resource URIs as part of the |
| - * [Compiler.readScript] method. In the standard implementation the package URIs |
| - * are converted to file URIs using the package root URI provided on the |
| + * [ScriptLoader.readScript] method. In the standard implementation the package |
| + * URIs are converted to file URIs using the package root URI provided on the |
| * command line as base. If the package root URI is |
| * 'file:///current/working/dir/' then the package URI 'package:foo/bar.dart' |
| * will be resolved to the resource URI |
| @@ -134,13 +133,14 @@ typedef Future<Iterable<LibraryElement>> ReuseLibrariesFunction( |
| */ |
| abstract class LibraryLoaderTask implements CompilerTask { |
| factory LibraryLoaderTask( |
| - Compiler compiler, |
| ResolvedUriTranslator uriTranslator, |
| ScriptLoader scriptLoader, |
| ElementScanner scriptScanner, |
| LibraryDeserializer deserializer, |
| LibraryLoaderListener listener, |
| - Environment environment) = _LibraryLoaderTask; |
| + Environment environment, |
| + DiagnosticReporter reporter, |
| + Measurer measurer) = _LibraryLoaderTask; |
| /// Returns all libraries that have been loaded. |
| Iterable<LibraryElement> get libraries; |
| @@ -297,13 +297,12 @@ class _LibraryLoaderTask extends CompilerTask implements LibraryLoaderTask { |
| /// conditional imports. |
| final Environment environment; |
| - final Compiler compiler; |
| - DiagnosticReporter get reporter => compiler.reporter; |
| + final DiagnosticReporter reporter; |
| - _LibraryLoaderTask(Compiler compiler, this.uriTranslator, this.scriptLoader, |
| - this.scanner, this.deserializer, this.listener, this.environment) |
| - : compiler = compiler, |
| - super(compiler.measurer); |
| + _LibraryLoaderTask(this.uriTranslator, this.scriptLoader, |
| + this.scanner, this.deserializer, this.listener, this.environment, |
| + this.reporter, Measurer measurer) |
| + : super(measurer); |
| String get name => 'LibraryLoader'; |
| @@ -386,7 +385,7 @@ class _LibraryLoaderTask extends CompilerTask implements LibraryLoaderTask { |
| // Wrap in Future to shield against errors in user code. |
| return reuseLibraries(libraryCanonicalUriMap.values); |
| }).catchError((exception, StackTrace trace) { |
| - compiler.reportCrashInUserCode( |
| + repoter.reportCrashInUserCode( |
|
Harry Terkelsen
2016/05/25 22:21:26
repoter -> reporter
Siggi Cherem (dart-lang)
2016/05/25 22:26:10
I knew it looked funny, but then thought it should
|
| 'Uncaught exception in reuseLibraries', exception, trace); |
| throw exception; // Async rethrow. |
| }).then((Iterable<LibraryElement> reusedLibraries) { |