| 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 String object = formatReference(node.object); | 386 String object = formatReference(node.object); |
| 387 String index = node.index == null | 387 String index = node.index == null |
| 388 ? 'no-index' | 388 ? 'no-index' |
| 389 : formatReference(node.index); | 389 : formatReference(node.index); |
| 390 String length = node.length == null | 390 String length = node.length == null |
| 391 ? 'no-length' | 391 ? 'no-length' |
| 392 : formatReference(node.length); | 392 : formatReference(node.length); |
| 393 return 'BoundsCheck $object $index $length ${node.checkString}'; | 393 return 'BoundsCheck $object $index $length ${node.checkString}'; |
| 394 } | 394 } |
| 395 | 395 |
| 396 visitNullCheck(cps_ir.NullCheck node) { | 396 visitReceiverCheck(cps_ir.ReceiverCheck node) { |
| 397 String value = formatReference(node.value); | 397 String value = formatReference(node.value); |
| 398 String condition = formatReference(node.condition); | 398 String condition = formatReference(node.condition); |
| 399 return 'NullCheck $value condition:$condition selector:${node.selector}'; | 399 return 'ReceiverCheck $value $condition ${node.selector} ' |
| 400 '${node.flagString}'; |
| 400 } | 401 } |
| 401 } | 402 } |
| 402 | 403 |
| 403 /** | 404 /** |
| 404 * Invents (and remembers) names for Continuations, Parameters, etc. | 405 * Invents (and remembers) names for Continuations, Parameters, etc. |
| 405 * The names must match the conventions used by IR Hydra, e.g. | 406 * The names must match the conventions used by IR Hydra, e.g. |
| 406 * Continuations and Functions must have names of form B### since they | 407 * Continuations and Functions must have names of form B### since they |
| 407 * are visualized as basic blocks. | 408 * are visualized as basic blocks. |
| 408 */ | 409 */ |
| 409 class Names { | 410 class Names { |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 } | 675 } |
| 675 | 676 |
| 676 visitRefinement(cps_ir.Refinement node) { | 677 visitRefinement(cps_ir.Refinement node) { |
| 677 unexpectedNode(node); | 678 unexpectedNode(node); |
| 678 } | 679 } |
| 679 | 680 |
| 680 visitBoundsCheck(cps_ir.BoundsCheck node) { | 681 visitBoundsCheck(cps_ir.BoundsCheck node) { |
| 681 unexpectedNode(node); | 682 unexpectedNode(node); |
| 682 } | 683 } |
| 683 | 684 |
| 684 visitNullCheck(cps_ir.NullCheck node) { | 685 visitReceiverCheck(cps_ir.ReceiverCheck node) { |
| 685 unexpectedNode(node); | 686 unexpectedNode(node); |
| 686 } | 687 } |
| 687 } | 688 } |
| OLD | NEW |