| 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 String args = formatArguments(node); | 410 String args = formatArguments(node); |
| 411 return "oneshot $name($args)"; | 411 return "oneshot $name($args)"; |
| 412 } | 412 } |
| 413 | 413 |
| 414 String visitLiteralList(LiteralList node) { | 414 String visitLiteralList(LiteralList node) { |
| 415 String values = node.values.map(visitExpression).join(', '); | 415 String values = node.values.map(visitExpression).join(', '); |
| 416 return "list [$values]"; | 416 return "list [$values]"; |
| 417 } | 417 } |
| 418 | 418 |
| 419 String visitConstant(Constant node) { | 419 String visitConstant(Constant node) { |
| 420 return "${node.value.toStructuredString()}"; | 420 return "${node.value.toStructuredText()}"; |
| 421 } | 421 } |
| 422 | 422 |
| 423 String visitThis(This node) { | 423 String visitThis(This node) { |
| 424 return "this"; | 424 return "this"; |
| 425 } | 425 } |
| 426 | 426 |
| 427 static bool usesInfixNotation(Expression node) { | 427 static bool usesInfixNotation(Expression node) { |
| 428 return node is Conditional || | 428 return node is Conditional || |
| 429 node is LogicalOperator || | 429 node is LogicalOperator || |
| 430 node is Assign || | 430 node is Assign || |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 String prefix = v.element == null ? 'v' : '${v.element.name}_'; | 611 String prefix = v.element == null ? 'v' : '${v.element.name}_'; |
| 612 while (name == null || _usedNames.contains(name)) { | 612 while (name == null || _usedNames.contains(name)) { |
| 613 name = "$prefix${_counter++}"; | 613 name = "$prefix${_counter++}"; |
| 614 } | 614 } |
| 615 _names[v] = name; | 615 _names[v] = name; |
| 616 _usedNames.add(name); | 616 _usedNames.add(name); |
| 617 } | 617 } |
| 618 return name; | 618 return name; |
| 619 } | 619 } |
| 620 } | 620 } |
| OLD | NEW |