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

Unified Diff: pkg/compiler/lib/src/dump_info.dart

Issue 1155633002: Fix 56 hints in pkg/compiler (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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
Index: pkg/compiler/lib/src/dump_info.dart
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index c6ab046068440adf271967167debadb89feaa6fa..e62cb616fe2e29d69f8cc8be10375fd8cb43690d 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -92,8 +92,6 @@ class ElementToJsonVisitor
ElementToJsonVisitor(this.compiler);
void run() {
- Backend backend = compiler.backend;
-
dart2jsVersion = compiler.hasBuildId ? compiler.buildId : null;
for (LibraryElement library in compiler.libraryLoader.libraries.toList()) {
@@ -296,7 +294,6 @@ class ElementToJsonVisitor
String inferredReturnType = null;
String returnType = null;
String sideEffects = null;
- String code = "";
StringBuffer emittedCode = compiler.dumpInfoTask.codeOf(element);
int size = compiler.dumpInfoTask.sizeOf(element);
@@ -559,7 +556,8 @@ class DumpInfoTask extends CompilerTask {
void dumpInfoJson(StringSink buffer) {
JsonEncoder encoder = const JsonEncoder.withIndent(' ');
- DateTime startToJsonTime = new DateTime.now();
+ var stopwatch = new Stopwatch();
Johnni Winther 2015/05/22 07:37:57 'var' -> 'Stopwatch'
kevmoo 2015/05/22 15:39:01 Done.
+ stopwatch.start();
Map<String, List<Map<String, String>>> holding =
<String, List<Map<String, String>>>{};
@@ -628,14 +626,12 @@ class DumpInfoTask extends CompilerTask {
'dump_minor_version': '2'
};
- Duration toJsonDuration = new DateTime.now().difference(startToJsonTime);
-
Map<String, dynamic> generalProgramInfo = <String, dynamic> {
'size': _programSize,
'dart2jsVersion': infoCollector.dart2jsVersion,
'compilationMoment': new DateTime.now().toString(),
'compilationDuration': compiler.totalCompileTime.elapsed.toString(),
- 'toJsonDuration': 0,
+ 'toJsonDuration': stopwatch.elapsedMilliseconds,
'dumpInfoDuration': this.timing.toString(),
'noSuchMethodEnabled': backend.enabledNoSuchMethod,
'minified': compiler.enableMinification

Powered by Google App Engine
This is Rietveld 408576698