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

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

Issue 26291005: dart2js: The name of a library without a library declaration is the empty string. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 return compiler.withCurrentElement(library, () { 332 return compiler.withCurrentElement(library, () {
333 return registerLibraryFromTag(handler, library, tag); 333 return registerLibraryFromTag(handler, library, tag);
334 }); 334 });
335 }); 335 });
336 }); 336 });
337 } 337 }
338 338
339 void checkDuplicatedLibraryName(LibraryElement library) { 339 void checkDuplicatedLibraryName(LibraryElement library) {
340 LibraryName tag = library.libraryTag; 340 LibraryName tag = library.libraryTag;
341 if (tag != null) { 341 if (tag != null) {
342 String name = library.getLibraryOrScriptName(); 342 String name = library.getLibraryName();
343 LibraryElement existing = 343 LibraryElement existing =
344 libraryNames.putIfAbsent(name, () => library); 344 libraryNames.putIfAbsent(name, () => library);
345 if (!identical(existing, library)) { 345 if (!identical(existing, library)) {
346 Uri uri = library.entryCompilationUnit.script.uri; 346 Uri uri = library.entryCompilationUnit.script.uri;
347 compiler.reportMessage( 347 compiler.reportMessage(
348 compiler.spanFromSpannable(tag.name, uri), 348 compiler.spanFromSpannable(tag.name, uri),
349 MessageKind.DUPLICATED_LIBRARY_NAME.error({'libraryName': name}), 349 MessageKind.DUPLICATED_LIBRARY_NAME.error({'libraryName': name}),
350 api.Diagnostic.WARNING); 350 api.Diagnostic.WARNING);
351 Uri existingUri = existing.entryCompilationUnit.script.uri; 351 Uri existingUri = existing.entryCompilationUnit.script.uri;
352 compiler.reportMessage( 352 compiler.reportMessage(
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 } 916 }
917 917
918 /** 918 /**
919 * Registers all top-level entities of [library] as starting point for the 919 * Registers all top-level entities of [library] as starting point for the
920 * fixed-point computation of the import/export scopes. 920 * fixed-point computation of the import/export scopes.
921 */ 921 */
922 void registerLibraryExports(LibraryElement library) { 922 void registerLibraryExports(LibraryElement library) {
923 nodeMap[library].registerInitialExports(); 923 nodeMap[library].registerInitialExports();
924 } 924 }
925 } 925 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698