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

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

Issue 23684057: Support new import rules. (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
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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 }); 558 });
559 compiler.withCurrentElement(element, () { 559 compiler.withCurrentElement(element, () {
560 compiler.reportFatalError( 560 compiler.reportFatalError(
561 element, 561 element,
562 MessageKind.GENERIC, {'text': 'Error: Duplicated import.'}); 562 MessageKind.GENERIC, {'text': 'Error: Duplicated import.'});
563 }); 563 });
564 } 564 }
565 }); 565 });
566 } else { 566 } else {
567 importedLibrary.forEachExport((Element element) { 567 importedLibrary.forEachExport((Element element) {
568 compiler.withCurrentElement(element, () { 568 compiler.withCurrentElement(importingLibrary, () {
Johnni Winther 2013/09/12 10:49:16 Errors reported on [import] pointed to the wrong f
569 if (combinatorFilter.exclude(element)) return; 569 if (combinatorFilter.exclude(element)) return;
570 importingLibrary.addImport(element, import, compiler); 570 importingLibrary.addImport(element, import, compiler);
571 }); 571 });
572 }); 572 });
573 } 573 }
574 } 574 }
575 } 575 }
576 576
577 /** 577 /**
578 * The combinator filter computed from an export tag and the library dependency 578 * The combinator filter computed from an export tag and the library dependency
(...skipping 291 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

Powered by Google App Engine
This is Rietveld 408576698