| 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('../leg.dart'); | 9 #import('../leg.dart'); |
| 10 | 10 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 return "Continue: (B${target.id})"; | 252 return "Continue: (B${target.id})"; |
| 253 } | 253 } |
| 254 | 254 |
| 255 String visitDivide(HDivide node) => visitInvokeStatic(node); | 255 String visitDivide(HDivide node) => visitInvokeStatic(node); |
| 256 | 256 |
| 257 String visitEquals(HEquals node) => visitInvokeStatic(node); | 257 String visitEquals(HEquals node) => visitInvokeStatic(node); |
| 258 | 258 |
| 259 String visitExit(HExit node) => "exit"; | 259 String visitExit(HExit node) => "exit"; |
| 260 | 260 |
| 261 String visitFieldGet(HFieldGet node) { | 261 String visitFieldGet(HFieldGet node) { |
| 262 String fieldName = node.element.name.slowToString(); | 262 return 'get ${temporaryId(node.receiver)}.${node.fieldName.slowToString()}'; |
| 263 return 'get ${temporaryId(node.receiver)}.$fieldName'; | |
| 264 } | 263 } |
| 265 | 264 |
| 266 String visitFieldSet(HFieldSet node) { | 265 String visitFieldSet(HFieldSet node) { |
| 267 String valueId = temporaryId(node.value); | 266 String valueId = temporaryId(node.value); |
| 268 String fieldName = node.element.name.slowToString(); | 267 String fieldName = node.fieldName.slowToString(); |
| 269 return 'set ${temporaryId(node.receiver)}.$fieldName to $valueId'; | 268 return 'set ${temporaryId(node.receiver)}.$fieldName to $valueId'; |
| 270 } | 269 } |
| 271 | 270 |
| 272 String visitLocalGet(HLocalGet node) => visitFieldGet(node); | 271 String visitLocalGet(HLocalGet node) => visitFieldGet(node); |
| 273 String visitLocalSet(HLocalSet node) => visitFieldSet(node); | 272 String visitLocalSet(HLocalSet node) => visitFieldSet(node); |
| 274 | 273 |
| 275 String visitGoto(HGoto node) { | 274 String visitGoto(HGoto node) { |
| 276 HBasicBlock target = currentBlock.successors[0]; | 275 HBasicBlock target = currentBlock.successors[0]; |
| 277 return "Goto: (B${target.id})"; | 276 return "Goto: (B${target.id})"; |
| 278 } | 277 } |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 String visitIs(HIs node) { | 508 String visitIs(HIs node) { |
| 510 String type = node.typeExpression.toString(); | 509 String type = node.typeExpression.toString(); |
| 511 return "TypeTest: ${temporaryId(node.expression)} is $type"; | 510 return "TypeTest: ${temporaryId(node.expression)} is $type"; |
| 512 } | 511 } |
| 513 | 512 |
| 514 String visitTypeConversion(HTypeConversion node) { | 513 String visitTypeConversion(HTypeConversion node) { |
| 515 String type = node.propagatedType.toString(); | 514 String type = node.propagatedType.toString(); |
| 516 return "TypeConversion: ${temporaryId(node.inputs[0])} to $type"; | 515 return "TypeConversion: ${temporaryId(node.inputs[0])} to $type"; |
| 517 } | 516 } |
| 518 } | 517 } |
| OLD | NEW |