| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.library_loader; | 5 library dart2js.library_loader; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'common.dart'; | 9 import 'common.dart'; |
| 10 import 'common/names.dart' show | 10 import 'common/names.dart' show |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 CompilationUnitElementX, | 24 CompilationUnitElementX, |
| 25 DeferredLoaderGetterElementX, | 25 DeferredLoaderGetterElementX, |
| 26 ErroneousElementX, | 26 ErroneousElementX, |
| 27 ExportElementX, | 27 ExportElementX, |
| 28 ImportElementX, | 28 ImportElementX, |
| 29 LibraryElementX, | 29 LibraryElementX, |
| 30 LibraryDependencyElementX, | 30 LibraryDependencyElementX, |
| 31 PrefixElementX, | 31 PrefixElementX, |
| 32 SyntheticImportElement; | 32 SyntheticImportElement; |
| 33 | 33 |
| 34 import 'native/native.dart' as native; | |
| 35 import 'script.dart'; | 34 import 'script.dart'; |
| 36 import 'tree/tree.dart'; | 35 import 'tree/tree.dart'; |
| 37 import 'util/util.dart' show | 36 import 'util/util.dart' show |
| 38 Link, | 37 Link, |
| 39 LinkBuilder; | 38 LinkBuilder; |
| 40 | 39 |
| 41 /** | 40 /** |
| 42 * [CompilerTask] for loading libraries and setting up the import/export scopes. | 41 * [CompilerTask] for loading libraries and setting up the import/export scopes. |
| 43 * | 42 * |
| 44 * The library loader uses four different kinds of URIs in different parts of | 43 * The library loader uses four different kinds of URIs in different parts of |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 LibraryElement createLibrarySync( | 623 LibraryElement createLibrarySync( |
| 625 LibraryDependencyHandler handler, | 624 LibraryDependencyHandler handler, |
| 626 Script script, | 625 Script script, |
| 627 Uri resolvedUri) { | 626 Uri resolvedUri) { |
| 628 LibraryElement element = new LibraryElementX(script, resolvedUri); | 627 LibraryElement element = new LibraryElementX(script, resolvedUri); |
| 629 return reporter.withCurrentElement(element, () { | 628 return reporter.withCurrentElement(element, () { |
| 630 if (handler != null) { | 629 if (handler != null) { |
| 631 handler.registerNewLibrary(element); | 630 handler.registerNewLibrary(element); |
| 632 libraryCanonicalUriMap[resolvedUri] = element; | 631 libraryCanonicalUriMap[resolvedUri] = element; |
| 633 } | 632 } |
| 634 native.maybeEnableNative(compiler, element); | |
| 635 compiler.scanner.scanLibrary(element); | 633 compiler.scanner.scanLibrary(element); |
| 636 return element; | 634 return element; |
| 637 }); | 635 }); |
| 638 } | 636 } |
| 639 } | 637 } |
| 640 | 638 |
| 641 | 639 |
| 642 /// A state machine for checking script tags come in the correct order. | 640 /// A state machine for checking script tags come in the correct order. |
| 643 class TagState { | 641 class TagState { |
| 644 /// Initial state. | 642 /// Initial state. |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 } | 1342 } |
| 1345 suffixes.add(const Link<Uri>().prepend(canonicalUri)); | 1343 suffixes.add(const Link<Uri>().prepend(canonicalUri)); |
| 1346 } | 1344 } |
| 1347 suffixChainMap[library] = suffixes; | 1345 suffixChainMap[library] = suffixes; |
| 1348 return; | 1346 return; |
| 1349 } | 1347 } |
| 1350 | 1348 |
| 1351 computeSuffixes(rootLibrary, const Link<Uri>()); | 1349 computeSuffixes(rootLibrary, const Link<Uri>()); |
| 1352 } | 1350 } |
| 1353 } | 1351 } |
| OLD | NEW |