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

Unified Diff: pkg/front_end/lib/src/incremental/file_state.dart

Issue 2993093003: Add support for SDK outline in KernelDriver. (Closed)
Patch Set: Merge and tweaks. Created 3 years, 4 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
« no previous file with comments | « pkg/front_end/lib/memory_file_system.dart ('k') | pkg/front_end/lib/src/incremental/kernel_driver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/incremental/file_state.dart
diff --git a/pkg/front_end/lib/src/incremental/file_state.dart b/pkg/front_end/lib/src/incremental/file_state.dart
index f6cc92ef3cf17427fee9bb8f06d4ae9e02845786..c95ac24b2307c0debee439b44f584a2b154147ad 100644
--- a/pkg/front_end/lib/src/incremental/file_state.dart
+++ b/pkg/front_end/lib/src/incremental/file_state.dart
@@ -281,6 +281,10 @@ class FileSystemState {
/// contain `file:*` URIs as keys.
final Map<Uri, FileState> _fileUriToFile = {};
+ /// The set of absolute URIs with the `dart` scheme that should be skipped.
+ /// We do this when we use SDK outline instead of compiling SDK sources.
+ final Set<Uri> skipSdkLibraries = new Set<Uri>();
+
FileSystemState(this._byteStore, this.fileSystem, this.uriTranslator,
this._salt, this._newFileFn);
@@ -333,6 +337,11 @@ class FileSystemState {
///
/// The returned file has the last known state since it was last refreshed.
Future<FileState> getFile(Uri absoluteUri) async {
+ // We don't need to process SDK libraries if we have SDK outline.
+ if (skipSdkLibraries.contains(absoluteUri)) {
+ return null;
+ }
+
// Resolve the absolute URI into the absolute file URI.
Uri fileUri;
if (absoluteUri.isScheme('file')) {
« no previous file with comments | « pkg/front_end/lib/memory_file_system.dart ('k') | pkg/front_end/lib/src/incremental/kernel_driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698