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

Side by Side Diff: bin/inference/print_summary.dart

Issue 2233093003: make dart2js_info strong-mode clean (Closed) Base URL: git@github.com:dart-lang/dart2js_info.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Utility to display statistics about "sends" as a table on the command line. 5 /// Utility to display statistics about "sends" as a table on the command line.
6 library compiler.tool.stats.print_summary; 6 library compiler.tool.stats.print_summary;
7 7
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'package:dart2js_info/info.dart'; 10 import 'package:dart2js_info/info.dart';
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 var uri = info.uri; 74 var uri = info.uri;
75 var bundle = uri.scheme == 'package' 75 var bundle = uri.scheme == 'package'
76 ? uri.pathSegments.first 76 ? uri.pathSegments.first
77 : uri.scheme == 'file' ? uri.pathSegments.last : '$uri'; 77 : uri.scheme == 'file' ? uri.pathSegments.last : '$uri';
78 currentBundleTotals = 78 currentBundleTotals =
79 bundleTotals.putIfAbsent(bundle, () => new Measurements()); 79 bundleTotals.putIfAbsent(bundle, () => new Measurements());
80 super.visitLibrary(info); 80 super.visitLibrary(info);
81 totals.addFrom(currentBundleTotals); 81 totals.addFrom(currentBundleTotals);
82 } 82 }
83 83
84 visitFunction(FunctionInfo function) { 84 Null visitFunction(FunctionInfo function) {
85 var measurements = function.measurements; 85 var measurements = function.measurements;
86 if (measurements == null) return; 86 if (measurements == null) return null;
87 currentBundleTotals.addFrom(measurements); 87 currentBundleTotals.addFrom(measurements);
88 return null;
88 } 89 }
89 } 90 }
90 91
91 const _groupColors = const [_YELLOW_COLOR, _NO_COLOR]; 92 const _groupColors = const [_YELLOW_COLOR, _NO_COLOR];
92 93
93 const _NO_COLOR = "\x1b[0m"; 94 const _NO_COLOR = "\x1b[0m";
94 const _GREEN_COLOR = "\x1b[32m"; 95 const _GREEN_COLOR = "\x1b[32m";
95 const _YELLOW_COLOR = "\x1b[33m"; 96 const _YELLOW_COLOR = "\x1b[33m";
96 const _WHITE_COLOR = "\x1b[37m"; 97 const _WHITE_COLOR = "\x1b[37m";
OLDNEW
« no previous file with comments | « bin/inference/client.dart ('k') | lib/json_info_codec.dart » ('j') | lib/json_info_codec.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698