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

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

Issue 2995773002: When using SDK outline, transplant its names into the name root. (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
« no previous file with comments | « no previous file | pkg/front_end/test/incremental_kernel_generator_test.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/kernel_driver.dart
diff --git a/pkg/front_end/lib/src/incremental/kernel_driver.dart b/pkg/front_end/lib/src/incremental/kernel_driver.dart
index 4e029a276c16c997fbba6f69ce541d100c7b98c9..a29d4f4755ea507c87e7359104e4c4870fc78b0b 100644
--- a/pkg/front_end/lib/src/incremental/kernel_driver.dart
+++ b/pkg/front_end/lib/src/incremental/kernel_driver.dart
@@ -8,6 +8,7 @@ import 'package:front_end/file_system.dart';
import 'package:front_end/src/base/api_signature.dart';
import 'package:front_end/src/base/performace_logger.dart';
import 'package:front_end/src/base/processed_options.dart';
+import 'package:front_end/src/byte_store/byte_store.dart';
import 'package:front_end/src/fasta/compiler_context.dart';
import 'package:front_end/src/fasta/dill/dill_library_builder.dart';
import 'package:front_end/src/fasta/dill/dill_target.dart';
@@ -15,7 +16,6 @@ import 'package:front_end/src/fasta/kernel/kernel_target.dart';
import 'package:front_end/src/fasta/kernel/utils.dart';
import 'package:front_end/src/fasta/ticker.dart';
import 'package:front_end/src/fasta/uri_translator.dart';
-import 'package:front_end/src/byte_store/byte_store.dart';
import 'package:front_end/src/incremental/file_state.dart';
import 'package:kernel/binary/ast_from_binary.dart';
import 'package:kernel/core_types.dart';
@@ -131,9 +131,11 @@ class KernelDriver {
return await runWithFrontEndContext('Compute delta', () async {
await _refreshInvalidatedFiles();
+ CanonicalName nameRoot = new CanonicalName.root();
+
// Load the SDK outline before building the graph, so that the file
// system state is configured to skip SDK libraries.
- await _loadSdkOutline();
+ await _loadSdkOutline(nameRoot);
// Ensure that the graph starting at the entry point is ready.
FileState entryLibrary =
@@ -147,7 +149,6 @@ class KernelDriver {
return cycles;
});
- CanonicalName nameRoot = new CanonicalName.root();
DillTarget dillTarget = new DillTarget(
new Ticker(isVerbose: false), _uriTranslator, _options.target);
@@ -359,7 +360,7 @@ class KernelDriver {
/// Load the SDK outline if its bytes are provided, and configure the file
/// system state to skip SDK library files.
- Future<Null> _loadSdkOutline() async {
+ Future<Null> _loadSdkOutline(CanonicalName nameRoot) async {
if (_sdkOutlineBytes != null) {
if (_sdkOutline == null) {
await _logger.runAsync('Load SDK outline from bytes.', () async {
@@ -371,6 +372,9 @@ class KernelDriver {
}
});
}
+ for (var sdkLibrary in _sdkOutline.libraries) {
+ nameRoot.transplantChild(sdkLibrary.canonicalName);
+ }
}
}
« no previous file with comments | « no previous file | pkg/front_end/test/incremental_kernel_generator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698