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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/file_state.dart

Issue 2653683004: Stop using SDK summary bundle. Analyze dart:xxx as any other libraries. (Closed)
Patch Set: Restore optional SDK bundle. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/dart/analysis/file_state.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index df7aaed9b02833fea66c9b03ae4a38fe4ca9b966..cc988988102752ae3f18f1d13dd7b3fec5170e75 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -301,7 +301,6 @@ class FileState {
if (_transitiveSignature == null) {
ApiSignature signature = new ApiSignature();
signature.addUint32List(_fsState._salt);
- signature.addString(_fsState._sdkApiSignature);
signature.addInt(transitiveFiles.length);
transitiveFiles
.map((file) => file.apiSignature)
@@ -436,37 +435,29 @@ class FileState {
_partedFiles = <FileState>[];
_exportFilters = <NameFilter>[];
for (UnlinkedImport import in _unlinked.imports) {
- if (!import.isImplicit) {
- String uri = import.uri;
- if (_isDartFileUri(uri)) {
- FileState file = _fileForRelativeUri(uri);
- if (file != null) {
- _importedFiles.add(file);
- }
- }
+ String uri = import.isImplicit ? 'dart:core' : import.uri;
+ FileState file = _fileForRelativeUri(uri);
+ if (file != null) {
+ _importedFiles.add(file);
}
}
for (UnlinkedExportPublic export in _unlinked.publicNamespace.exports) {
String uri = export.uri;
- if (_isDartFileUri(uri)) {
- FileState file = _fileForRelativeUri(uri);
- if (file != null) {
- _exportedFiles.add(file);
- _exportFilters
- .add(new NameFilter.forUnlinkedCombinators(export.combinators));
- }
+ FileState file = _fileForRelativeUri(uri);
+ if (file != null) {
+ _exportedFiles.add(file);
+ _exportFilters
+ .add(new NameFilter.forUnlinkedCombinators(export.combinators));
}
}
for (String uri in _unlinked.publicNamespace.parts) {
- if (_isDartFileUri(uri)) {
- FileState file = _fileForRelativeUri(uri);
- if (file != null) {
- _partedFiles.add(file);
- // TODO(scheglov) Sort for stable results?
- _fsState._partToLibraries
- .putIfAbsent(file, () => <FileState>[])
- .add(this);
- }
+ FileState file = _fileForRelativeUri(uri);
+ if (file != null) {
+ _partedFiles.add(file);
+ // TODO(scheglov) Sort for stable results?
+ _fsState._partToLibraries
+ .putIfAbsent(file, () => <FileState>[])
+ .add(this);
}
}
@@ -524,10 +515,6 @@ class FileState {
}
return true;
}
-
- static bool _isDartFileUri(String uri) {
- return !uri.startsWith('dart:');
- }
}
/**
@@ -541,7 +528,6 @@ class FileSystemState {
final SourceFactory _sourceFactory;
final AnalysisOptions _analysisOptions;
final Uint32List _salt;
- final String _sdkApiSignature;
/**
* Mapping from a URI to the corresponding [FileState].
@@ -577,8 +563,7 @@ class FileSystemState {
this._resourceProvider,
this._sourceFactory,
this._analysisOptions,
- this._salt,
- this._sdkApiSignature) {
+ this._salt) {
_testView = new FileSystemStateTestView(this);
}
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | pkg/analyzer/test/src/dart/analysis/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698