| 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 if (patchUri != null) { | 351 if (patchUri != null) { |
| 352 compiler.patchParser.patchLibrary(handler, patchUri, library); | 352 compiler.patchParser.patchLibrary(handler, patchUri, library); |
| 353 } | 353 } |
| 354 } | 354 } |
| 355 | 355 |
| 356 /** | 356 /** |
| 357 * Handle a part tag in the scope of [library]. The [resolvedUri] given is | 357 * Handle a part tag in the scope of [library]. The [resolvedUri] given is |
| 358 * used as is, any URI resolution should be done beforehand. | 358 * used as is, any URI resolution should be done beforehand. |
| 359 */ | 359 */ |
| 360 void scanPart(Part part, Uri resolvedUri, LibraryElement library) { | 360 void scanPart(Part part, Uri resolvedUri, LibraryElement library) { |
| 361 if (!resolvedUri.isAbsolute()) throw new ArgumentError(resolvedUri); | 361 if (!resolvedUri.isAbsolute) throw new ArgumentError(resolvedUri); |
| 362 Uri readableUri = compiler.translateResolvedUri(library, resolvedUri, part); | 362 Uri readableUri = compiler.translateResolvedUri(library, resolvedUri, part); |
| 363 Script sourceScript = compiler.readScript(readableUri, part); | 363 Script sourceScript = compiler.readScript(readableUri, part); |
| 364 CompilationUnitElement unit = | 364 CompilationUnitElement unit = |
| 365 new CompilationUnitElementX(sourceScript, library); | 365 new CompilationUnitElementX(sourceScript, library); |
| 366 compiler.withCurrentElement(unit, () { | 366 compiler.withCurrentElement(unit, () { |
| 367 compiler.scanner.scan(unit); | 367 compiler.scanner.scan(unit); |
| 368 if (unit.partTag == null) { | 368 if (unit.partTag == null) { |
| 369 bool wasDiagnosticEmitted = false; | 369 bool wasDiagnosticEmitted = false; |
| 370 compiler.withCurrentElement(library, () { | 370 compiler.withCurrentElement(library, () { |
| 371 wasDiagnosticEmitted = | 371 wasDiagnosticEmitted = |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 } | 828 } |
| 829 | 829 |
| 830 /** | 830 /** |
| 831 * Registers all top-level entities of [library] as starting point for the | 831 * Registers all top-level entities of [library] as starting point for the |
| 832 * fixed-point computation of the import/export scopes. | 832 * fixed-point computation of the import/export scopes. |
| 833 */ | 833 */ |
| 834 void registerLibraryExports(LibraryElement library) { | 834 void registerLibraryExports(LibraryElement library) { |
| 835 nodeMap[library].registerInitialExports(); | 835 nodeMap[library].registerInitialExports(); |
| 836 } | 836 } |
| 837 } | 837 } |
| OLD | NEW |