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

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

Issue 1414913002: Introduce .isMalformed (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address review Created 5 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
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 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 message: "No export for $duplicate from ${duplicate.library} " 968 message: "No export for $duplicate from ${duplicate.library} "
969 "in $library.")); 969 "in $library."));
970 infos.add(reporter.createMessage( 970 infos.add(reporter.createMessage(
971 duplicate, 971 duplicate,
972 MessageKind.DUPLICATE_EXPORT_DECL, 972 MessageKind.DUPLICATE_EXPORT_DECL,
973 {'name': name, 'uriString': duplicateExports.head.uri})); 973 {'name': name, 'uriString': duplicateExports.head.uri}));
974 } 974 }
975 975
976 Element existingElement = exportScope[name]; 976 Element existingElement = exportScope[name];
977 if (existingElement != null && existingElement != element) { 977 if (existingElement != null && existingElement != element) {
978 if (existingElement.isErroneous) { 978 if (existingElement.isMalformed) {
979 createDuplicateExportMessage(element, exports); 979 createDuplicateExportMessage(element, exports);
980 createDuplicateExportDeclMessage(element, exports); 980 createDuplicateExportDeclMessage(element, exports);
981 element = existingElement; 981 element = existingElement;
982 } else if (existingElement.library == library) { 982 } else if (existingElement.library == library) {
983 // Do nothing. [existingElement] hides [element]. 983 // Do nothing. [existingElement] hides [element].
984 } else if (element.library == library) { 984 } else if (element.library == library) {
985 // [element] hides [existingElement]. 985 // [element] hides [existingElement].
986 exportScope[name] = element; 986 exportScope[name] = element;
987 exporters[element] = exports; 987 exporters[element] = exports;
988 } else { 988 } else {
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 } 1344 }
1345 suffixes.add(const Link<Uri>().prepend(canonicalUri)); 1345 suffixes.add(const Link<Uri>().prepend(canonicalUri));
1346 } 1346 }
1347 suffixChainMap[library] = suffixes; 1347 suffixChainMap[library] = suffixes;
1348 return; 1348 return;
1349 } 1349 }
1350 1350
1351 computeSuffixes(rootLibrary, const Link<Uri>()); 1351 computeSuffixes(rootLibrary, const Link<Uri>());
1352 } 1352 }
1353 } 1353 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart ('k') | pkg/compiler/lib/src/parser/partial_elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698