| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 tree_ir_tracer; | 5 library tree_ir_tracer; |
| 6 | 6 |
| 7 import 'dart:async' show EventSink; | 7 import 'dart:async' show EventSink; |
| 8 import '../tracer.dart'; | 8 import '../tracer.dart'; |
| 9 import 'tree_ir_nodes.dart'; | 9 import 'tree_ir_nodes.dart'; |
| 10 | 10 |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 return node.dartType.toString(); | 508 return node.dartType.toString(); |
| 509 } | 509 } |
| 510 | 510 |
| 511 @override | 511 @override |
| 512 String visitCreateInvocationMirror(CreateInvocationMirror node) { | 512 String visitCreateInvocationMirror(CreateInvocationMirror node) { |
| 513 String args = node.arguments.map(visitExpression).join(', '); | 513 String args = node.arguments.map(visitExpression).join(', '); |
| 514 return 'CreateInvocationMirror(${node.selector.name}, $args)'; | 514 return 'CreateInvocationMirror(${node.selector.name}, $args)'; |
| 515 } | 515 } |
| 516 | 516 |
| 517 @override | 517 @override |
| 518 String visitInterceptor(Interceptor node) { |
| 519 return 'Interceptor(${visitExpression(node.input)})'; |
| 520 } |
| 521 |
| 522 @override |
| 518 String visitForeignExpression(ForeignExpression node) { | 523 String visitForeignExpression(ForeignExpression node) { |
| 519 String arguments = node.arguments.map(visitExpression).join(', '); | 524 String arguments = node.arguments.map(visitExpression).join(', '); |
| 520 return 'Foreign "${node.codeTemplate}"($arguments)'; | 525 return 'Foreign "${node.codeTemplate}"($arguments)'; |
| 521 } | 526 } |
| 522 | 527 |
| 523 @override | 528 @override |
| 524 String visitApplyBuiltinOperator(ApplyBuiltinOperator node) { | 529 String visitApplyBuiltinOperator(ApplyBuiltinOperator node) { |
| 525 String args = node.arguments.map(visitExpression).join(', '); | 530 String args = node.arguments.map(visitExpression).join(', '); |
| 526 return 'ApplyBuiltinOperator ${node.operator} ($args)'; | 531 return 'ApplyBuiltinOperator ${node.operator} ($args)'; |
| 527 } | 532 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 545 String prefix = v.element == null ? 'v' : '${v.element.name}_'; | 550 String prefix = v.element == null ? 'v' : '${v.element.name}_'; |
| 546 while (name == null || _usedNames.contains(name)) { | 551 while (name == null || _usedNames.contains(name)) { |
| 547 name = "$prefix${_counter++}"; | 552 name = "$prefix${_counter++}"; |
| 548 } | 553 } |
| 549 _names[v] = name; | 554 _names[v] = name; |
| 550 _usedNames.add(name); | 555 _usedNames.add(name); |
| 551 } | 556 } |
| 552 return name; | 557 return name; |
| 553 } | 558 } |
| 554 } | 559 } |
| OLD | NEW |