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

Unified Diff: bin/function_size_analysis.dart

Issue 2380273003: Include more information when deserializing ProgramInfo (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « bin/deferred_library_size.dart ('k') | lib/info.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « bin/deferred_library_size.dart ('k') | lib/info.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698