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

Side by Side Diff: pkg/compiler/lib/src/library_loader.dart

Issue 1511533002: Show import for import of parts. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | no next file » | 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 library dart2js.library_loader; 5 library dart2js.library_loader;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'common.dart'; 9 import 'common.dart';
10 import 'common/names.dart' show 10 import 'common/names.dart' show
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 var readScript = compiler.readScript; 603 var readScript = compiler.readScript;
604 if (readableUri == null) { 604 if (readableUri == null) {
605 readableUri = resolvedUri; 605 readableUri = resolvedUri;
606 readScript = compiler.synthesizeScript; 606 readScript = compiler.synthesizeScript;
607 } 607 }
608 return reporter.withCurrentElement(importingLibrary, () { 608 return reporter.withCurrentElement(importingLibrary, () {
609 return readScript(node, readableUri).then((Script script) { 609 return readScript(node, readableUri).then((Script script) {
610 if (script == null) return null; 610 if (script == null) return null;
611 LibraryElement element = 611 LibraryElement element =
612 createLibrarySync(handler, script, resolvedUri); 612 createLibrarySync(handler, script, resolvedUri);
613 CompilationUnitElementX compilationUnit = element.entryCompilationUnit;
614 if (compilationUnit.partTag != null) {
615 DiagnosticMessage error = reporter.withCurrentElement(
616 compilationUnit,
617 () => reporter.createMessage(
618 compilationUnit.partTag, MessageKind.IMPORT_PART_OF));
619 DiagnosticMessage info = reporter.withCurrentElement(
620 importingLibrary,
621 () => reporter.createMessage(
622 node,
623 MessageKind.IMPORT_PART_OF_HERE));
624 reporter.reportError(error, <DiagnosticMessage>[info]);
625 }
613 return processLibraryTags(handler, element).then((_) { 626 return processLibraryTags(handler, element).then((_) {
614 reporter.withCurrentElement(element, () { 627 reporter.withCurrentElement(element, () {
615 handler.registerLibraryExports(element); 628 handler.registerLibraryExports(element);
616 }); 629 });
617 return element; 630 return element;
618 }); 631 });
619 }); 632 });
620 }); 633 });
621 } 634 }
622 635
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 } 1355 }
1343 suffixes.add(const Link<Uri>().prepend(canonicalUri)); 1356 suffixes.add(const Link<Uri>().prepend(canonicalUri));
1344 } 1357 }
1345 suffixChainMap[library] = suffixes; 1358 suffixChainMap[library] = suffixes;
1346 return; 1359 return;
1347 } 1360 }
1348 1361
1349 computeSuffixes(rootLibrary, const Link<Uri>()); 1362 computeSuffixes(rootLibrary, const Link<Uri>());
1350 } 1363 }
1351 } 1364 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698