OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 analyzer.src.task.dart; | 5 library analyzer.src.task.dart; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'dart:math' as math; | 8 import 'dart:math' as math; |
9 | 9 |
10 import 'package:analyzer/src/context/cache.dart'; | 10 import 'package:analyzer/src/context/cache.dart'; |
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 String uriContent = importDirective.uriContent; | 852 String uriContent = importDirective.uriContent; |
853 if (DartUriResolver.isDartExtUri(uriContent)) { | 853 if (DartUriResolver.isDartExtUri(uriContent)) { |
854 libraryElement.hasExtUri = true; | 854 libraryElement.hasExtUri = true; |
855 } | 855 } |
856 Source importedSource = importDirective.source; | 856 Source importedSource = importDirective.source; |
857 if (importedSource != null && context.exists(importedSource)) { | 857 if (importedSource != null && context.exists(importedSource)) { |
858 // The imported source will be null if the URI in the import | 858 // The imported source will be null if the URI in the import |
859 // directive was invalid. | 859 // directive was invalid. |
860 LibraryElement importedLibrary = importLibraryMap[importedSource]; | 860 LibraryElement importedLibrary = importLibraryMap[importedSource]; |
861 if (importedLibrary != null) { | 861 if (importedLibrary != null) { |
| 862 if (importedLibrary.isDartCore) { |
| 863 explicitlyImportsCore = true; |
| 864 } |
862 ImportElementImpl importElement = | 865 ImportElementImpl importElement = |
863 new ImportElementImpl(directive.offset); | 866 new ImportElementImpl(directive.offset); |
864 StringLiteral uriLiteral = importDirective.uri; | 867 StringLiteral uriLiteral = importDirective.uri; |
865 if (uriLiteral != null) { | 868 if (uriLiteral != null) { |
866 importElement.uriOffset = uriLiteral.offset; | 869 importElement.uriOffset = uriLiteral.offset; |
867 importElement.uriEnd = uriLiteral.end; | 870 importElement.uriEnd = uriLiteral.end; |
868 } | 871 } |
869 importElement.uri = uriContent; | 872 importElement.uri = uriContent; |
870 importElement.deferred = importDirective.deferredKeyword != null; | 873 importElement.deferred = importDirective.deferredKeyword != null; |
871 importElement.combinators = _buildCombinators(importDirective); | 874 importElement.combinators = _buildCombinators(importDirective); |
(...skipping 2652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3524 @override | 3527 @override |
3525 bool moveNext() { | 3528 bool moveNext() { |
3526 if (_newSources.isEmpty) { | 3529 if (_newSources.isEmpty) { |
3527 return false; | 3530 return false; |
3528 } | 3531 } |
3529 currentTarget = _newSources.first; | 3532 currentTarget = _newSources.first; |
3530 _newSources.remove(currentTarget); | 3533 _newSources.remove(currentTarget); |
3531 return true; | 3534 return true; |
3532 } | 3535 } |
3533 } | 3536 } |
OLD | NEW |