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

Unified Diff: pkg/compiler/lib/src/compiler.dart

Issue 2798443002: Add "load from .dill" file capability and run a white-box test. (Closed)
Patch Set: johnni comments Created 3 years, 8 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/compiler/lib/src/commandline_options.dart ('k') | pkg/compiler/lib/src/dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 94666231d090e22269a6dd7eb8e7849f6b55808c..c9ebbf1755d0208bd51aeed5c36b304a34c2508f 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -44,6 +44,7 @@ import 'environment.dart';
import 'id_generator.dart';
import 'io/source_information.dart' show SourceInformation;
import 'js_backend/backend.dart' show JavaScriptBackend;
+import 'kernel/world_builder.dart' show KernelWorldBuilder;
import 'library_loader.dart'
show
ElementScanner,
@@ -114,6 +115,11 @@ abstract class Compiler {
List<Uri> librariesToAnalyzeWhenRun;
+ /// Object holding the correspondence between Kernel IR and their
+ /// corresponding K/JElements. Only (currently) used when used in conjunction
+ /// with --use-kernel and --read-dill flags.
+ KernelWorldBuilder kernelWorldBuilder;
+
ResolvedUriTranslator get resolvedUriTranslator;
LibraryElement mainApp;
@@ -212,6 +218,7 @@ abstract class Compiler {
serialization = new SerializationTask(this),
patchParser = new PatchParserTask(this),
libraryLoader = new LibraryLoaderTask(
+ options.loadFromDill,
resolvedUriTranslator,
options.compileOnly
? new _NoScriptLoader(this)
@@ -348,8 +355,8 @@ abstract class Compiler {
}
}
String importChain = compactImportChain.map((CodeLocation codeLocation) {
- return codeLocation
- .relativize(loadedLibraries.rootLibrary.canonicalUri);
+ return codeLocation.relativize(
+ (loadedLibraries.rootLibrary as LibraryElement).canonicalUri);
}).join(' => ');
if (!importChains.contains(importChain)) {
@@ -381,7 +388,8 @@ abstract class Compiler {
/// The method returns a [Future] allowing for the loading of additional
/// libraries.
LoadedLibraries processLoadedLibraries(LoadedLibraries loadedLibraries) {
- loadedLibraries.forEachLibrary((LibraryElement library) {
+ kernelWorldBuilder = libraryLoader.worldBuilder;
+ loadedLibraries.forEachLibrary((LibraryEntity library) {
backend.setAnnotations(library);
});
« no previous file with comments | « pkg/compiler/lib/src/commandline_options.dart ('k') | pkg/compiler/lib/src/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698