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

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

Issue 2846433003: Run closed_world2_test using the normal compiler pipeline. (Closed)
Patch Set: 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
Index: pkg/compiler/lib/src/deferred_load.dart
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index 66e73c309adc9454905ccbf67559661f267a9644..3500f9869c15a80708c32410978b80f3c163f279 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -661,7 +661,7 @@ class DeferredLoadTask extends CompilerTask {
}
}
- void onResolutionComplete(FunctionElement main) {
+ void onResolutionComplete(MethodElement main) {
if (!isProgramSplit) {
allOutputUnits.add(mainOutputUnit);
return;
@@ -677,8 +677,7 @@ class DeferredLoadTask extends CompilerTask {
() => measure(() {
// Starting from main, traverse the program and find all
// dependencies.
- _mapDependencies(
- element: compiler.mainFunction, import: _fakeMainImport);
+ _mapDependencies(element: main, import: _fakeMainImport);
// Also add "global" dependencies to the main OutputUnit. These
// are things that the backend needs but cannot associate with a
@@ -771,6 +770,8 @@ class DeferredLoadTask extends CompilerTask {
void beforeResolution(Compiler compiler) {
if (compiler.mainApp == null) return;
+ // TODO(johnniwinther): Support deferred load for kernel based elements.
+ if (compiler.mainApp is! LibraryElement) return;
Siggi Cherem (dart-lang) 2017/04/26 16:39:18 to make this easier to read, I'd switch this to:
Johnni Winther 2017/04/27 06:50:14 Done.
_allDeferredImports[_fakeMainImport] = compiler.mainApp;
var lastDeferred;
// When detecting duplicate prefixes of deferred libraries there are 4

Powered by Google App Engine
This is Rietveld 408576698