| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 class HTracer extends HGraphVisitor { | 5 class HTracer extends HGraphVisitor { |
| 6 int indent = 0; | 6 int indent = 0; |
| 7 final StringBuffer output; | 7 final StringBuffer output; |
| 8 | 8 |
| 9 factory HTracer.singleton() { | 9 factory HTracer.singleton() { |
| 10 if (_singleton === null) _singleton = new HTracer._internal(); | 10 if (_singleton === null) _singleton = new HTracer._internal(); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 => visitInvokeStatic(invoke); | 262 => visitInvokeStatic(invoke); |
| 263 | 263 |
| 264 String visitInvokeStatic(HInvokeStatic invoke) { | 264 String visitInvokeStatic(HInvokeStatic invoke) { |
| 265 String target = temporaryId(invoke.target); | 265 String target = temporaryId(invoke.target); |
| 266 int offset = HInvoke.ARGUMENTS_OFFSET; | 266 int offset = HInvoke.ARGUMENTS_OFFSET; |
| 267 List arguments = | 267 List arguments = |
| 268 invoke.inputs.getRange(offset, invoke.inputs.length - offset); | 268 invoke.inputs.getRange(offset, invoke.inputs.length - offset); |
| 269 return visitGenericInvoke("Invoke", target, arguments); | 269 return visitGenericInvoke("Invoke", target, arguments); |
| 270 } | 270 } |
| 271 | 271 |
| 272 String visitInvokeSuper(HInvokeSuper invoke) { |
| 273 String target = temporaryId(invoke.target); |
| 274 int offset = HInvoke.ARGUMENTS_OFFSET + 1; |
| 275 List arguments = |
| 276 invoke.inputs.getRange(offset, invoke.inputs.length - offset); |
| 277 return visitGenericInvoke("Invoke super", target, arguments); |
| 278 } |
| 279 |
| 272 String visitForeign(HForeign foreign) { | 280 String visitForeign(HForeign foreign) { |
| 273 return visitGenericInvoke("Foreign", "${foreign.code}", foreign.inputs); | 281 return visitGenericInvoke("Foreign", "${foreign.code}", foreign.inputs); |
| 274 } | 282 } |
| 275 | 283 |
| 276 String visitForeignNew(HForeignNew node) { | 284 String visitForeignNew(HForeignNew node) { |
| 277 return visitGenericInvoke("New", "${node.element.name}", node.inputs); | 285 return visitGenericInvoke("New", "${node.element.name}", node.inputs); |
| 278 } | 286 } |
| 279 | 287 |
| 280 String visitLess(HLess node) => visitInvokeStatic(node); | 288 String visitLess(HLess node) => visitInvokeStatic(node); |
| 281 String visitLessEqual(HLessEqual node) => visitInvokeStatic(node); | 289 String visitLessEqual(HLessEqual node) => visitInvokeStatic(node); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 case HType.INTEGER: type = "integer"; break; | 370 case HType.INTEGER: type = "integer"; break; |
| 363 case HType.DOUBLE: type = "double"; break; | 371 case HType.DOUBLE: type = "double"; break; |
| 364 case HType.NUMBER: type = "number"; break; | 372 case HType.NUMBER: type = "number"; break; |
| 365 case HType.STRING: type = "string"; break; | 373 case HType.STRING: type = "string"; break; |
| 366 case HType.STRING_OR_ARRAY: type = "string_or_array"; break; | 374 case HType.STRING_OR_ARRAY: type = "string_or_array"; break; |
| 367 default: unreachable(); | 375 default: unreachable(); |
| 368 } | 376 } |
| 369 return "TypeGuard: ${temporaryId(node.inputs[0])} is $type"; | 377 return "TypeGuard: ${temporaryId(node.inputs[0])} is $type"; |
| 370 } | 378 } |
| 371 } | 379 } |
| OLD | NEW |