| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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:async' show EventSink; | 7 import 'dart:async' show EventSink; |
| 8 | 8 |
| 9 import 'ssa.dart'; | 9 import 'ssa.dart'; |
| 10 import '../js_backend/js_backend.dart'; | 10 import '../js_backend/js_backend.dart'; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 | 169 |
| 170 class HInstructionStringifier implements HVisitor<String> { | 170 class HInstructionStringifier implements HVisitor<String> { |
| 171 final Compiler compiler; | 171 final Compiler compiler; |
| 172 final JavaScriptItemCompilationContext context; | 172 final JavaScriptItemCompilationContext context; |
| 173 final HBasicBlock currentBlock; | 173 final HBasicBlock currentBlock; |
| 174 | 174 |
| 175 HInstructionStringifier(this.context, this.currentBlock, this.compiler); | 175 HInstructionStringifier(this.context, this.currentBlock, this.compiler); |
| 176 | 176 |
| 177 visit(HInstruction node) => node.accept(this); | 177 visit(HInstruction node) => '${node.accept(this)} ${node.instructionType}'; |
| 178 | 178 |
| 179 String temporaryId(HInstruction instruction) { | 179 String temporaryId(HInstruction instruction) { |
| 180 String prefix; | 180 String prefix; |
| 181 HType type = instruction.instructionType; | 181 HType type = instruction.instructionType; |
| 182 if (type.isNull()) { | 182 if (type.isNull()) { |
| 183 prefix = 'u'; | 183 prefix = 'u'; |
| 184 } else if (type.isConflicting()) { | 184 } else if (type.isConflicting()) { |
| 185 prefix = 'c'; | 185 prefix = 'c'; |
| 186 } else if (type.isExtendableArray(compiler)) { | 186 } else if (type.isExtendableArray(compiler)) { |
| 187 prefix = 'e'; | 187 prefix = 'e'; |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 | 515 |
| 516 String visitTypeKnown(HTypeKnown node) { | 516 String visitTypeKnown(HTypeKnown node) { |
| 517 assert(node.inputs.length == 1); | 517 assert(node.inputs.length == 1); |
| 518 return "TypeKnown: ${temporaryId(node.checkedInput)} is ${node.knownType}"; | 518 return "TypeKnown: ${temporaryId(node.checkedInput)} is ${node.knownType}"; |
| 519 } | 519 } |
| 520 | 520 |
| 521 String visitRangeConversion(HRangeConversion node) { | 521 String visitRangeConversion(HRangeConversion node) { |
| 522 return "RangeConversion: ${node.checkedInput}"; | 522 return "RangeConversion: ${node.checkedInput}"; |
| 523 } | 523 } |
| 524 } | 524 } |
| OLD | NEW |