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

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

Issue 2908153003: It's alive! (Closed)
Patch Set: Created 3 years, 7 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 baeb2aa1a46cc89a5f8df54478a8f4efe1c5bad9..5d489bd35d1018b563c423d44ecede168057e390 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -165,6 +165,8 @@ class DeferredLoadTask extends CompilerTask {
/// Returns the [OutputUnit] where [element] belongs.
OutputUnit outputUnitForElement(Element element) {
+ // TODO(johnniwinther): Support use of entities by splitting maps by
+ // entity kind.
if (!isProgramSplit) return mainOutputUnit;
element = element.implementation;
@@ -184,13 +186,15 @@ class DeferredLoadTask extends CompilerTask {
}
/// Returns the [OutputUnit] where [element] belongs.
- OutputUnit outputUnitForClass(ClassElement element) {
- return outputUnitForElement(element);
+ OutputUnit outputUnitForClass(ClassEntity element) {
+ if (!isProgramSplit) return mainOutputUnit;
Siggi Cherem (dart-lang) 2017/05/30 22:10:20 how about removing the check here and the cast bel
Johnni Winther 2017/05/31 08:19:31 Done.
+ return outputUnitForElement(element as ClassElement);
}
/// Returns the [OutputUnit] where [element] belongs.
- OutputUnit outputUnitForMember(MemberElement element) {
- return outputUnitForElement(element);
+ OutputUnit outputUnitForMember(MemberEntity element) {
+ if (!isProgramSplit) return mainOutputUnit;
+ return outputUnitForElement(element as MemberElement);
}
/// Direct access to the output-unit to element relation used for testing.

Powered by Google App Engine
This is Rietveld 408576698