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

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

Issue 2993093003: Add support for SDK outline in KernelDriver. (Closed)
Patch Set: Tweaks for review comments. 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
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..64ff7cd372b28b34bd62f02b37360a94d0864cfa 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 = {};
+ /// If `true`, then files with the `dart` scheme should be skipped.
+ /// We do this when we use SDK outline instead of compiling SDK sources.
+ bool skipSdkLibraries = false;
+
FileSystemState(this._byteStore, this.fileSystem, this.uriTranslator,
this._salt, this._newFileFn);
@@ -333,6 +337,12 @@ 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.
+ // TODO(scheglov): Skip all libraries, or only included into the outline?
+ if (skipSdkLibraries && absoluteUri.isScheme('dart')) {
+ return null;
+ }
+
// Resolve the absolute URI into the absolute file URI.
Uri fileUri;
if (absoluteUri.isScheme('file')) {

Powered by Google App Engine
This is Rietveld 408576698