| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * [CompilerTask] for loading libraries and setting up the import/export scopes. | 8 * [CompilerTask] for loading libraries and setting up the import/export scopes. |
| 9 * | 9 * |
| 10 * The library loader uses four different kinds of URIs in different parts of | 10 * The library loader uses four different kinds of URIs in different parts of |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 } | 274 } |
| 275 return TagState.NEXT[value]; | 275 return TagState.NEXT[value]; |
| 276 } | 276 } |
| 277 | 277 |
| 278 bool importsDartCore = false; | 278 bool importsDartCore = false; |
| 279 var libraryDependencies = new LinkBuilder<LibraryDependency>(); | 279 var libraryDependencies = new LinkBuilder<LibraryDependency>(); |
| 280 Uri base = library.entryCompilationUnit.script.uri; | 280 Uri base = library.entryCompilationUnit.script.uri; |
| 281 | 281 |
| 282 // TODO(rnystrom): Remove .toList() here if #11523 is fixed. | 282 // TODO(rnystrom): Remove .toList() here if #11523 is fixed. |
| 283 return Future.forEach(library.tags.reverse().toList(), (LibraryTag tag) { | 283 return Future.forEach(library.tags.reverse().toList(), (LibraryTag tag) { |
| 284 compiler.withCurrentElement(library, () { | 284 return compiler.withCurrentElement(library, () { |
| 285 if (tag.isImport) { | 285 if (tag.isImport) { |
| 286 Import import = tag; | 286 Import import = tag; |
| 287 tagState = checkTag(TagState.IMPORT_OR_EXPORT, import); | 287 tagState = checkTag(TagState.IMPORT_OR_EXPORT, import); |
| 288 if (import.uri.dartString.slowToString() == 'dart:core') { | 288 if (import.uri.dartString.slowToString() == 'dart:core') { |
| 289 importsDartCore = true; | 289 importsDartCore = true; |
| 290 } | 290 } |
| 291 libraryDependencies.addLast(import); | 291 libraryDependencies.addLast(import); |
| 292 } else if (tag.isExport) { | 292 } else if (tag.isExport) { |
| 293 tagState = checkTag(TagState.IMPORT_OR_EXPORT, tag); | 293 tagState = checkTag(TagState.IMPORT_OR_EXPORT, tag); |
| 294 libraryDependencies.addLast(tag); | 294 libraryDependencies.addLast(tag); |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 } | 870 } |
| 871 | 871 |
| 872 /** | 872 /** |
| 873 * Registers all top-level entities of [library] as starting point for the | 873 * Registers all top-level entities of [library] as starting point for the |
| 874 * fixed-point computation of the import/export scopes. | 874 * fixed-point computation of the import/export scopes. |
| 875 */ | 875 */ |
| 876 void registerLibraryExports(LibraryElement library) { | 876 void registerLibraryExports(LibraryElement library) { |
| 877 nodeMap[library].registerInitialExports(); | 877 nodeMap[library].registerInitialExports(); |
| 878 } | 878 } |
| 879 } | 879 } |
| OLD | NEW |