| 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 dart2js.ir_tracer; | 5 library dart2js.ir_tracer; |
| 6 | 6 |
| 7 import 'dart:async' show EventSink; | 7 import 'dart:async' show EventSink; |
| 8 import 'cps_ir_nodes.dart' as cps_ir; | 8 import 'cps_ir_nodes.dart' as cps_ir; |
| 9 import '../tracer.dart'; | 9 import '../tracer.dart'; |
| 10 | 10 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 String index = formatReference(node.index); | 384 String index = formatReference(node.index); |
| 385 String value = formatReference(node.value); | 385 String value = formatReference(node.value); |
| 386 return 'SetIndex $object $index $value'; | 386 return 'SetIndex $object $index $value'; |
| 387 } | 387 } |
| 388 | 388 |
| 389 visitRefinement(cps_ir.Refinement node) { | 389 visitRefinement(cps_ir.Refinement node) { |
| 390 String value = formatReference(node.value); | 390 String value = formatReference(node.value); |
| 391 return 'Refinement $value ${node.refineType}'; | 391 return 'Refinement $value ${node.refineType}'; |
| 392 } | 392 } |
| 393 | 393 |
| 394 visitBoundsCheck(cps_ir.BoundsCheck node) { |
| 395 String object = formatReference(node.object); |
| 396 String index = node.index == null |
| 397 ? 'no-index' |
| 398 : formatReference(node.index); |
| 399 String length = node.length == null |
| 400 ? 'no-length' |
| 401 : formatReference(node.length); |
| 402 return 'BoundsCheck $object $index $length ${node.checkString}'; |
| 403 } |
| 404 |
| 394 visitNullCheck(cps_ir.NullCheck node) { | 405 visitNullCheck(cps_ir.NullCheck node) { |
| 395 String value = formatReference(node.value); | 406 String value = formatReference(node.value); |
| 396 String condition = formatReference(node.condition); | 407 String condition = formatReference(node.condition); |
| 397 return 'NullCheck $value condition:$condition selector:${node.selector}'; | 408 return 'NullCheck $value condition:$condition selector:${node.selector}'; |
| 398 } | 409 } |
| 399 } | 410 } |
| 400 | 411 |
| 401 /** | 412 /** |
| 402 * Invents (and remembers) names for Continuations, Parameters, etc. | 413 * Invents (and remembers) names for Continuations, Parameters, etc. |
| 403 * The names must match the conventions used by IR Hydra, e.g. | 414 * The names must match the conventions used by IR Hydra, e.g. |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 } | 683 } |
| 673 | 684 |
| 674 visitYield(cps_ir.Yield node) { | 685 visitYield(cps_ir.Yield node) { |
| 675 unexpectedNode(node); | 686 unexpectedNode(node); |
| 676 } | 687 } |
| 677 | 688 |
| 678 visitRefinement(cps_ir.Refinement node) { | 689 visitRefinement(cps_ir.Refinement node) { |
| 679 unexpectedNode(node); | 690 unexpectedNode(node); |
| 680 } | 691 } |
| 681 | 692 |
| 693 visitBoundsCheck(cps_ir.BoundsCheck node) { |
| 694 unexpectedNode(node); |
| 695 } |
| 696 |
| 682 visitNullCheck(cps_ir.NullCheck node) { | 697 visitNullCheck(cps_ir.NullCheck node) { |
| 683 unexpectedNode(node); | 698 unexpectedNode(node); |
| 684 } | 699 } |
| 685 } | 700 } |
| OLD | NEW |