Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/library_loader.dart

Issue 23742006: Handle exception from scanning. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698