| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 return "Continue: (B${target.id})"; | 236 return "Continue: (B${target.id})"; |
| 237 } | 237 } |
| 238 | 238 |
| 239 String visitDivide(HDivide node) => visitInvokeStatic(node); | 239 String visitDivide(HDivide node) => visitInvokeStatic(node); |
| 240 | 240 |
| 241 String visitEquals(HEquals node) => visitInvokeStatic(node); | 241 String visitEquals(HEquals node) => visitInvokeStatic(node); |
| 242 | 242 |
| 243 String visitExit(HExit node) => "exit"; | 243 String visitExit(HExit node) => "exit"; |
| 244 | 244 |
| 245 String visitFieldGet(HFieldGet node) { | 245 String visitFieldGet(HFieldGet node) { |
| 246 return 'get ${temporaryId(node.receiver)}'; | 246 String fieldName = node.element.name.slowToString(); |
| 247 return 'get ${temporaryId(node.receiver)}.$fieldName'; |
| 247 } | 248 } |
| 248 | 249 |
| 249 String visitFieldSet(HFieldSet node) { | 250 String visitFieldSet(HFieldSet node) { |
| 250 String valueId = temporaryId(node.value); | 251 String valueId = temporaryId(node.value); |
| 251 return 'set ${temporaryId(node.receiver)} to $valueId'; | 252 String fieldName = node.element.name.slowToString(); |
| 253 return 'set ${temporaryId(node.receiver)}.$fieldName to $valueId'; |
| 252 } | 254 } |
| 253 | 255 |
| 254 String visitLocalGet(HLocalGet node) => visitFieldGet(node); | 256 String visitLocalGet(HLocalGet node) => visitFieldGet(node); |
| 255 String visitLocalSet(HLocalSet node) => visitFieldSet(node); | 257 String visitLocalSet(HLocalSet node) => visitFieldSet(node); |
| 256 | 258 |
| 257 String visitGoto(HGoto node) { | 259 String visitGoto(HGoto node) { |
| 258 HBasicBlock target = currentBlock.successors[0]; | 260 HBasicBlock target = currentBlock.successors[0]; |
| 259 return "Goto: (B${target.id})"; | 261 return "Goto: (B${target.id})"; |
| 260 } | 262 } |
| 261 | 263 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 String visitIs(HIs node) { | 488 String visitIs(HIs node) { |
| 487 String type = node.typeExpression.toString(); | 489 String type = node.typeExpression.toString(); |
| 488 return "TypeTest: ${temporaryId(node.expression)} is $type"; | 490 return "TypeTest: ${temporaryId(node.expression)} is $type"; |
| 489 } | 491 } |
| 490 | 492 |
| 491 String visitTypeConversion(HTypeConversion node) { | 493 String visitTypeConversion(HTypeConversion node) { |
| 492 String type = node.propagatedType.toString(); | 494 String type = node.propagatedType.toString(); |
| 493 return "TypeConversion: ${temporaryId(node.inputs[0])} to $type"; | 495 return "TypeConversion: ${temporaryId(node.inputs[0])} to $type"; |
| 494 } | 496 } |
| 495 } | 497 } |
| OLD | NEW |