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

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

Issue 2797443008: Reapply "Add "load from .dill" file capability and run a white-box test."" (Closed)
Patch Set: take two 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..ed1e09c2cfd51e3b8f20d12a2ccc1a377b287ff9 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -212,6 +212,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 +349,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 +382,7 @@ abstract class Compiler {
/// The method returns a [Future] allowing for the loading of additional
/// libraries.
LoadedLibraries processLoadedLibraries(LoadedLibraries loadedLibraries) {
- loadedLibraries.forEachLibrary((LibraryElement library) {
+ loadedLibraries.forEachLibrary((LibraryEntity library) {
backend.setAnnotations(library);
});
@@ -597,15 +598,17 @@ abstract class Compiler {
phase = PHASE_RESOLVING;
resolutionEnqueuer.applyImpact(mainImpact);
if (options.resolveOnly) {
- libraryLoader.libraries.where((LibraryElement library) {
+ libraryLoader.libraries.where((LibraryEntity library) {
return !serialization.isDeserialized(library);
- }).forEach((LibraryElement library) {
- reporter.log('Enqueuing ${library.canonicalUri}');
+ }).forEach((LibraryEntity library) {
+ reporter
+ .log('Enqueuing ${(library as LibraryElement).canonicalUri}');
resolutionEnqueuer.applyImpact(computeImpactForLibrary(library));
});
} else if (analyzeAll) {
- libraryLoader.libraries.forEach((LibraryElement library) {
- reporter.log('Enqueuing ${library.canonicalUri}');
+ libraryLoader.libraries.forEach((LibraryEntity library) {
+ reporter
+ .log('Enqueuing ${(library as LibraryElement).canonicalUri}');
resolutionEnqueuer.applyImpact(computeImpactForLibrary(library));
});
} else if (options.analyzeMain) {
@@ -650,7 +653,7 @@ abstract class Compiler {
serialization.serializeToSink(
userOutputProvider.createOutputSink(
'', 'data', api.OutputType.serializationData),
- libraryLoader.libraries.where((LibraryElement library) {
+ libraryLoader.libraries.where((LibraryEntity library) {
return !serialization.isDeserialized(library);
}));
}
@@ -687,7 +690,7 @@ abstract class Compiler {
codegenEnqueuer.applyImpact(
backend.onCodegenStart(closedWorld, _codegenWorldBuilder));
if (compileAll) {
- libraryLoader.libraries.forEach((LibraryElement library) {
+ libraryLoader.libraries.forEach((LibraryEntity library) {
codegenEnqueuer.applyImpact(computeImpactForLibrary(library));
});
}
@@ -964,10 +967,11 @@ abstract class Compiler {
}
}
- libraryLoader.libraries.forEach((LibraryElement library) {
+ libraryLoader.libraries.forEach((LibraryEntity entity) {
// TODO(ahe): Implement better heuristics to discover entry points of
// packages and use that to discover unused implementation details in
// packages.
+ LibraryElement library = entity;
if (library.isPlatformLibrary || library.isPackageLibrary) return;
library.compilationUnits.forEach((unit) {
unit.forEachLocalMember(checkLive);
« 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