| Index: bin/debug_info.dart
|
| diff --git a/bin/debug_info.dart b/bin/debug_info.dart
|
| index c729721f5bddb44f0eaccfc96cd26c3004ae55fb..3fd5ea9c98642bbaf37bf48ae4769b8567469391 100644
|
| --- a/bin/debug_info.dart
|
| +++ b/bin/debug_info.dart
|
| @@ -47,9 +47,14 @@ main(args) {
|
| // Validate that code-size adds up.
|
| int realTotal = info.program.size;
|
| int totalLib = info.libraries.fold(0, (n, lib) => n + lib.size);
|
| - if (totalLib != realTotal) {
|
| - var percent = ((realTotal - totalLib) * 100 / realTotal).toStringAsFixed(2);
|
| - _fail('$percent% size missing (sum of all libs < total)');
|
| + int constantsSize = info.constants.fold(0, (n, c) => n + c.size);
|
| + int accounted = totalLib + constantsSize;
|
| +
|
| + if (accounted != realTotal) {
|
| + var percent = ((realTotal - accounted) * 100 / realTotal)
|
| + .toStringAsFixed(2);
|
| + _fail('$percent% size missing: $accounted (all libs + consts) '
|
| + '< $realTotal (total)');
|
| }
|
| var missingTotal = tracker.missing.values.fold(0, (a, b) => a + b);
|
| if (missingTotal > 0) {
|
|
|