OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |