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

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

Issue 2993093003: Add support for SDK outline in KernelDriver. (Closed)
Patch Set: 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..09183b3cdb1bff8ef03556e953d5a4b3b9a9521f 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,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 SK outline.
Siggi Cherem (dart-lang) 2017/08/05 03:22:47 nit: "SK" => "an SDK"
scheglov 2017/08/06 21:04:06 Done.
+ if (skipSdkLibraries && absoluteUri.isScheme('dart')) {
Siggi Cherem (dart-lang) 2017/08/05 03:22:47 rather than skipping any `dart:*` library, could w
scheglov 2017/08/06 21:04:06 I'm adding TODO for now.
aam 2017/08/07 14:41:34 Good point! Yes, it seems it won't work with how v
Siggi Cherem (dart-lang) 2017/08/07 15:29:52 Konstantin: I was thinking more about this over th
aam 2017/08/07 15:42:11 Ah, true, I don't see patch_sdk.dart using increme
scheglov 2017/08/07 15:51:25 The first problem is that we need to make sure tha
scheglov 2017/08/07 15:51:25 So, is there still a reason to change the way `dar
aam 2017/08/07 16:04:38 Not sure, about short term, but in long term, to m
Siggi Cherem (dart-lang) 2017/08/07 16:27:42 So basically we need ProcessedOptions to expose th
+ 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