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

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

Issue 2569733002: Even less reliance on Compiler.closedWorld (Closed)
Patch Set: Created 4 years 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/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 82895d960a01c9ef38e0e73e01ea8da29947194b..6a78c7ddb4a78b0d841c7a9df7ec0b09ac22f463 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -485,20 +485,6 @@ abstract class Compiler implements LibraryLoaderListener {
// [JavaScriptBackend]. Currently needed for testing.
String get patchVersion => backend.patchVersion;
- Element _unnamedListConstructor;
- Element get unnamedListConstructor {
Johnni Winther 2016/12/12 15:37:36 Moved to CommonElements
- if (_unnamedListConstructor != null) return _unnamedListConstructor;
- return _unnamedListConstructor =
- coreClasses.listClass.lookupDefaultConstructor();
- }
-
- Element _filledListConstructor;
- Element get filledListConstructor {
- if (_filledListConstructor != null) return _filledListConstructor;
- return _filledListConstructor =
- coreClasses.listClass.lookupConstructor("filled");
- }
-
/**
* Get an [Uri] pointing to a patch for the dart: library with
* the given path. Returns null if there is no patch.
@@ -748,7 +734,7 @@ abstract class Compiler implements LibraryLoaderListener {
if (options.dumpInfo) {
dumpInfoTask.reportSize(programSize);
- dumpInfoTask.dumpInfo();
+ dumpInfoTask.dumpInfo(closedWorld);
}
backend.sourceInformationStrategy.onComplete();
@@ -763,7 +749,7 @@ abstract class Compiler implements LibraryLoaderListener {
WorldImpl world = resolverWorld.openWorld.closeWorld(reporter);
// Compute whole-program-knowledge that the backend needs. (This might
// require the information computed in [world.closeWorld].)
- backend.onResolutionComplete(world);
+ backend.onResolutionComplete(world, world);
deferredLoadTask.onResolutionComplete(mainFunction);
@@ -1491,6 +1477,18 @@ class _CompilerCoreTypes implements CoreTypes, CoreClasses, CommonElements {
}
return element;
}
+
+ ConstructorElement _unnamedListConstructor;
+ ConstructorElement get unnamedListConstructor {
+ if (_unnamedListConstructor != null) return _unnamedListConstructor;
Siggi Cherem (dart-lang) 2016/12/12 15:50:16 while we are at it, switch to ??=
Johnni Winther 2016/12/13 11:20:28 Done.
+ return _unnamedListConstructor = listClass.lookupDefaultConstructor();
+ }
+
+ ConstructorElement _filledListConstructor;
+ ConstructorElement get filledListConstructor {
+ if (_filledListConstructor != null) return _filledListConstructor;
+ return _filledListConstructor = listClass.lookupConstructor("filled");
+ }
}
class CompilerDiagnosticReporter extends DiagnosticReporter {

Powered by Google App Engine
This is Rietveld 408576698