| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 engine.resolver; | 5 library engine.resolver; |
| 6 | 6 |
| 7 import "dart:math" as math; | 7 import "dart:math" as math; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/utilities_collection.dart'; | 10 import 'package:analyzer/src/generated/utilities_collection.dart'; |
| (...skipping 7949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7960 } | 7960 } |
| 7961 } | 7961 } |
| 7962 } else if (directive is ExportDirective) { | 7962 } else if (directive is ExportDirective) { |
| 7963 ExportDirective exportDirective = directive; | 7963 ExportDirective exportDirective = directive; |
| 7964 Source exportedSource = exportDirective.source; | 7964 Source exportedSource = exportDirective.source; |
| 7965 if (exportedSource != null) { | 7965 if (exportedSource != null) { |
| 7966 // The exported source will be null if the URI in the export | 7966 // The exported source will be null if the URI in the export |
| 7967 // directive was invalid. | 7967 // directive was invalid. |
| 7968 Library exportedLibrary = _libraryMap[exportedSource]; | 7968 Library exportedLibrary = _libraryMap[exportedSource]; |
| 7969 if (exportedLibrary != null) { | 7969 if (exportedLibrary != null) { |
| 7970 ExportElementImpl exportElement = new ExportElementImpl(); | 7970 ExportElementImpl exportElement = |
| 7971 new ExportElementImpl(directive.offset); |
| 7971 StringLiteral uriLiteral = exportDirective.uri; | 7972 StringLiteral uriLiteral = exportDirective.uri; |
| 7972 exportElement.uriOffset = uriLiteral.offset; | 7973 exportElement.uriOffset = uriLiteral.offset; |
| 7973 exportElement.uriEnd = uriLiteral.end; | 7974 exportElement.uriEnd = uriLiteral.end; |
| 7974 exportElement.uri = exportDirective.uriContent; | 7975 exportElement.uri = exportDirective.uriContent; |
| 7975 exportElement.combinators = _buildCombinators(exportDirective); | 7976 exportElement.combinators = _buildCombinators(exportDirective); |
| 7976 LibraryElement exportedLibraryElement = | 7977 LibraryElement exportedLibraryElement = |
| 7977 exportedLibrary.libraryElement; | 7978 exportedLibrary.libraryElement; |
| 7978 if (exportedLibraryElement != null) { | 7979 if (exportedLibraryElement != null) { |
| 7979 exportElement.exportedLibrary = exportedLibraryElement; | 7980 exportElement.exportedLibrary = exportedLibraryElement; |
| 7980 } | 7981 } |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8664 } | 8665 } |
| 8665 } else if (directive is ExportDirective) { | 8666 } else if (directive is ExportDirective) { |
| 8666 ExportDirective exportDirective = directive; | 8667 ExportDirective exportDirective = directive; |
| 8667 Source exportedSource = exportDirective.source; | 8668 Source exportedSource = exportDirective.source; |
| 8668 if (exportedSource != null && | 8669 if (exportedSource != null && |
| 8669 analysisContext.exists(exportedSource)) { | 8670 analysisContext.exists(exportedSource)) { |
| 8670 // The exported source will be null if the URI in the export | 8671 // The exported source will be null if the URI in the export |
| 8671 // directive was invalid. | 8672 // directive was invalid. |
| 8672 ResolvableLibrary exportedLibrary = _libraryMap[exportedSource]; | 8673 ResolvableLibrary exportedLibrary = _libraryMap[exportedSource]; |
| 8673 if (exportedLibrary != null) { | 8674 if (exportedLibrary != null) { |
| 8674 ExportElementImpl exportElement = new ExportElementImpl(); | 8675 ExportElementImpl exportElement = |
| 8676 new ExportElementImpl(directive.offset); |
| 8675 StringLiteral uriLiteral = exportDirective.uri; | 8677 StringLiteral uriLiteral = exportDirective.uri; |
| 8676 if (uriLiteral != null) { | 8678 if (uriLiteral != null) { |
| 8677 exportElement.uriOffset = uriLiteral.offset; | 8679 exportElement.uriOffset = uriLiteral.offset; |
| 8678 exportElement.uriEnd = uriLiteral.end; | 8680 exportElement.uriEnd = uriLiteral.end; |
| 8679 } | 8681 } |
| 8680 exportElement.uri = exportDirective.uriContent; | 8682 exportElement.uri = exportDirective.uriContent; |
| 8681 exportElement.combinators = _buildCombinators(exportDirective); | 8683 exportElement.combinators = _buildCombinators(exportDirective); |
| 8682 LibraryElement exportedLibraryElement = | 8684 LibraryElement exportedLibraryElement = |
| 8683 exportedLibrary.libraryElement; | 8685 exportedLibrary.libraryElement; |
| 8684 if (exportedLibraryElement != null) { | 8686 if (exportedLibraryElement != null) { |
| (...skipping 6708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15393 * library. | 15395 * library. |
| 15394 */ | 15396 */ |
| 15395 final HashSet<String> members = new HashSet<String>(); | 15397 final HashSet<String> members = new HashSet<String>(); |
| 15396 | 15398 |
| 15397 /** | 15399 /** |
| 15398 * Names of resolved or unresolved class members that are read in the | 15400 * Names of resolved or unresolved class members that are read in the |
| 15399 * library. | 15401 * library. |
| 15400 */ | 15402 */ |
| 15401 final HashSet<String> readMembers = new HashSet<String>(); | 15403 final HashSet<String> readMembers = new HashSet<String>(); |
| 15402 } | 15404 } |
| OLD | NEW |