| 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('../leg.dart'); | 10 #import('../leg.dart'); |
| 10 | 11 |
| 11 final bool GENERATE_SSA_TRACE = false; | 12 final bool GENERATE_SSA_TRACE = false; |
| 12 final String SSA_TRACE_FILTER = null; | 13 final String SSA_TRACE_FILTER = null; |
| 13 | 14 |
| 14 class HTracer extends HGraphVisitor implements Tracer { | 15 class HTracer extends HGraphVisitor implements Tracer { |
| 15 JavaScriptItemCompilationContext context; | 16 JavaScriptItemCompilationContext context; |
| 16 int indent = 0; | 17 int indent = 0; |
| 17 final RandomAccessFile output; | 18 final RandomAccessFile output; |
| 18 final bool enabled = GENERATE_SSA_TRACE; | 19 final bool enabled = GENERATE_SSA_TRACE; |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 | 514 |
| 514 String visitIs(HIs node) { | 515 String visitIs(HIs node) { |
| 515 String type = node.typeExpression.toString(); | 516 String type = node.typeExpression.toString(); |
| 516 return "TypeTest: ${temporaryId(node.expression)} is $type"; | 517 return "TypeTest: ${temporaryId(node.expression)} is $type"; |
| 517 } | 518 } |
| 518 | 519 |
| 519 String visitTypeConversion(HTypeConversion node) { | 520 String visitTypeConversion(HTypeConversion node) { |
| 520 return "TypeConversion: ${temporaryId(node.inputs[0])} to ${node.type}"; | 521 return "TypeConversion: ${temporaryId(node.inputs[0])} to ${node.type}"; |
| 521 } | 522 } |
| 522 } | 523 } |
| OLD | NEW |