Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/compiler.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart |
| index 88d35c5b5e09c04ad7913bb54136a2fed13d1890..866bb33ca1a9c9cc6b8ee4b846720659b1c6f5db 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/compiler.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/compiler.dart |
| @@ -206,7 +206,7 @@ abstract class Backend { |
| void registerStaticUse(Element element, Enqueuer enqueuer) {} |
| - void onLibraryScanned(LibraryElement library, Uri uri) {} |
| + void onLibraryLoaded(LibraryElement library, Uri uri) {} |
| void registerMetadataInstantiatedType(DartType type, TreeElements elements) {} |
| void registerMetadataStaticUse(Element element) {} |
| @@ -704,7 +704,7 @@ abstract class Compiler implements DiagnosticListener { |
| * This method is called before [library] import and export scopes have been |
| * set up. |
| */ |
| - void onLibraryScanned(LibraryElement library, Uri uri) { |
| + void onLibraryLoaded(LibraryElement library, Uri uri) { |
| if (dynamicClass != null) { |
| // When loading the built-in libraries, dynamicClass is null. We |
| // take advantage of this as core imports js_helper and sees [dynamic] |
| @@ -726,7 +726,15 @@ abstract class Compiler implements DiagnosticListener { |
| deferredLibraryClass = |
| findRequiredElement(library, const SourceString('DeferredLibrary')); |
| } |
|
ngeoffray
2013/08/15 19:13:02
Nit: Keep the else/if syntax.
zarah
2013/08/28 10:20:13
Done.
|
| - backend.onLibraryScanned(library, uri); |
| + |
| + if (isolateHelperLibrary == null |
| + && (uri == new Uri(scheme: 'dart', path: '_isolate_helper'))) { |
| + isolateHelperLibrary = scanBuiltinLibrary('_isolate_helper'); |
| + } else if (foreignLibrary == null |
| + && (uri == new Uri(scheme: 'dart', path: '_foreign_helper'))) { |
|
ngeoffray
2013/08/15 19:13:02
Nit: '&&' at the same indentation as foreignLibrar
zarah
2013/08/28 10:20:13
Done.
|
| + foreignLibrary = scanBuiltinLibrary('_foreign_helper'); |
| + } |
| + backend.onLibraryLoaded(library, uri); |
| } |
| Element findRequiredElement(LibraryElement library, SourceString name) { |
| @@ -835,9 +843,6 @@ abstract class Compiler implements DiagnosticListener { |
| void scanBuiltinLibraries() { |
| jsHelperLibrary = scanBuiltinLibrary('_js_helper'); |
| interceptorsLibrary = scanBuiltinLibrary('_interceptors'); |
|
ngeoffray
2013/08/15 19:13:02
What about those two? Do you plan on moving them?
zarah
2013/08/28 10:20:13
The jsHelperLibrary is used just below and the int
|
| - foreignLibrary = scanBuiltinLibrary('_foreign_helper'); |
| - isolateHelperLibrary = scanBuiltinLibrary('_isolate_helper'); |
| - |
| assertMethod = jsHelperLibrary.find(const SourceString('assertHelper')); |
| identicalFunction = coreLibrary.find(const SourceString('identical')); |