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

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

Issue 2387353002: Eagerly compute closure classes (Closed)
Patch Set: Add comments. Created 4 years, 2 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/closure.dart ('k') | pkg/compiler/lib/src/inferrer/simple_types_inferrer.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 f3a62ae21732f51dfc6147b619b418852ba78601..536a2794bbbb4aab262ea5c37792bdea108da24f 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -724,14 +724,8 @@ abstract class Compiler implements LibraryLoaderListener {
return;
}
assert(mainFunction != null);
- phase = PHASE_DONE_RESOLVING;
- openWorld.closeWorld();
- // Compute whole-program-knowledge that the backend needs. (This might
- // require the information computed in [world.populate].)
- backend.onResolutionComplete();
-
- deferredLoadTask.onResolutionComplete(mainFunction);
+ closeResolution();
reporter.log('Inferring types...');
globalInference.runGlobalTypeInference(mainFunction);
@@ -767,6 +761,22 @@ abstract class Compiler implements LibraryLoaderListener {
checkQueues();
});
+ /// Perform the steps needed to fully end the resolution phase.
+ void closeResolution() {
+ phase = PHASE_DONE_RESOLVING;
+
+ openWorld.closeWorld();
+ // Compute whole-program-knowledge that the backend needs. (This might
+ // require the information computed in [world.closeWorld].)
+ backend.onResolutionComplete();
+
+ deferredLoadTask.onResolutionComplete(mainFunction);
+
+ // TODO(johnniwinther): Move this after rti computation but before
+ // reflection members computation, and (re-)close the world afterwards.
+ closureToClassMapper.createClosureClasses();
+ }
+
void fullyEnqueueLibrary(LibraryElement library, Enqueuer world) {
void enqueueAll(Element element) {
fullyEnqueueTopLevelElement(element, world);
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698