Index: bin/function_size_analysis.dart |
diff --git a/bin/function_size_analysis.dart b/bin/function_size_analysis.dart |
index e97166da114268a6af6f0256910848fc15bd5700..ac681309630a3879d6d8a94483133acaa20ff6bb 100644 |
--- a/bin/function_size_analysis.dart |
+++ b/bin/function_size_analysis.dart |
@@ -21,7 +21,7 @@ showCodeDistribution(AllInfo info, |
{bool filter(Info info), bool showLibrarySizes: false}) { |
var realTotal = info.program.size; |
if (filter == null) filter = (i) => true; |
- var reported = [] |
+ var reported = <BasicInfo>[] |
..addAll(info.functions.where(filter)) |
..addAll(info.fields.where(filter)); |
@@ -69,9 +69,11 @@ showCodeDistribution(AllInfo info, |
dominatedSize[n] = size; |
return size; |
} |
+ |
helper(mainMethod); |
reported.forEach((n) => dominatedSize.putIfAbsent(n, () => n.size)); |
- reported.sort((a, b) => (dominatedSize[b] + nodeData[b].maxSize) - |
+ reported.sort((a, b) => |
+ (dominatedSize[b] + nodeData[b].maxSize) - |
(dominatedSize[a] + nodeData[a].maxSize)); |
if (showLibrarySizes) { |
@@ -129,6 +131,7 @@ class _SccData { |
max += n.size; |
n.deps.forEach(helper); |
} |
+ |
helper(this); |
_maxSize = max; |
} |