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 b3668c1287622b29ca54347879f56699d815f334..ea67b79ccd138eba4156679067aef7293e527f2b 100644 |
--- a/pkg/compiler/lib/src/deferred_load.dart |
+++ b/pkg/compiler/lib/src/deferred_load.dart |
@@ -180,12 +180,22 @@ class DeferredLoadTask extends CompilerTask { |
return _elementToOutputUnit[element]; |
} |
+ /// Direct access to the output-unit to element relation used for testing. |
+ OutputUnit getOutputUnitForElementForTesting(Element element) { |
+ return _elementToOutputUnit[element]; |
+ } |
+ |
/// Returns the [OutputUnit] where [constant] belongs. |
OutputUnit outputUnitForConstant(ConstantValue constant) { |
if (!isProgramSplit) return mainOutputUnit; |
return _constantToOutputUnit[constant]; |
} |
+ /// Direct access to the output-unit to constants map used for testing. |
+ Map<ConstantValue, OutputUnit> get outputUnitForConstantsForTesting { |
+ return _constantToOutputUnit; |
+ } |
+ |
bool isDeferred(Element element) { |
return outputUnitForElement(element) != mainOutputUnit; |
} |
@@ -348,7 +358,7 @@ class DeferredLoadTask extends CompilerTask { |
treeElements.forEachConstantNode( |
(ast.Node node, ConstantExpression expression) { |
if (compiler.serialization.isDeserialized(analyzableElement)) { |
- if (!expression.isImplicit && !expression.isPotential) { |
+ if (!expression.isPotential) { |
// Enforce evaluation of [expression]. |
backend.constants.getConstantValue(expression); |
} |
@@ -926,7 +936,8 @@ class DeferredLoadTask extends CompilerTask { |
StringBuffer sb = new StringBuffer(); |
for (OutputUnit outputUnit in allOutputUnits) { |
- sb.write(outputUnit.name); |
+ sb.write('\n-------------------------------\n'); |
+ sb.write('Output unit: ${outputUnit.name}'); |
List<String> elements = elementMap[outputUnit]; |
if (elements != null) { |
sb.write('\n elements:'); |