Chromium Code Reviews| 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. |