OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 library tracer; | 5 library tracer; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 import 'ssa.dart'; | 8 import 'ssa.dart'; |
9 import '../js_backend/js_backend.dart'; | 9 import '../js_backend/js_backend.dart'; |
10 import '../dart2jslib.dart'; | 10 import '../dart2jslib.dart'; |
(...skipping 19 matching lines...) Expand all Loading... |
30 void traceCompilation(String methodName, | 30 void traceCompilation(String methodName, |
31 JavaScriptItemCompilationContext compilationContext) { | 31 JavaScriptItemCompilationContext compilationContext) { |
32 if (!enabled) return; | 32 if (!enabled) return; |
33 this.context = compilationContext; | 33 this.context = compilationContext; |
34 traceActive = | 34 traceActive = |
35 SSA_TRACE_FILTER == null || methodName.contains(SSA_TRACE_FILTER); | 35 SSA_TRACE_FILTER == null || methodName.contains(SSA_TRACE_FILTER); |
36 if (!traceActive) return; | 36 if (!traceActive) return; |
37 tag("compilation", () { | 37 tag("compilation", () { |
38 printProperty("name", methodName); | 38 printProperty("name", methodName); |
39 printProperty("method", methodName); | 39 printProperty("method", methodName); |
40 printProperty("date", new Date.now().millisecondsSinceEpoch); | 40 printProperty("date", new DateTime.now().millisecondsSinceEpoch); |
41 }); | 41 }); |
42 } | 42 } |
43 | 43 |
44 void traceGraph(String name, HGraph graph) { | 44 void traceGraph(String name, HGraph graph) { |
45 if (!traceActive) return; | 45 if (!traceActive) return; |
46 tag("cfg", () { | 46 tag("cfg", () { |
47 printProperty("name", name); | 47 printProperty("name", name); |
48 visitDominatorTree(graph); | 48 visitDominatorTree(graph); |
49 }); | 49 }); |
50 } | 50 } |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 } | 543 } |
544 | 544 |
545 String visitTypeConversion(HTypeConversion node) { | 545 String visitTypeConversion(HTypeConversion node) { |
546 return "TypeConversion: ${temporaryId(node.checkedInput)} to ${node.type}"; | 546 return "TypeConversion: ${temporaryId(node.checkedInput)} to ${node.type}"; |
547 } | 547 } |
548 | 548 |
549 String visitRangeConversion(HRangeConversion node) { | 549 String visitRangeConversion(HRangeConversion node) { |
550 return "RangeConversion: ${node.checkedInput}"; | 550 return "RangeConversion: ${node.checkedInput}"; |
551 } | 551 } |
552 } | 552 } |
OLD | NEW |