| 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 | 8 |
| 9 import 'cps_ir_nodes.dart' as cps_ir hide Function; | 9 import 'cps_ir_nodes.dart' as cps_ir hide Function; |
| 10 import '../tracer.dart'; | 10 import '../tracer.dart'; |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 } | 330 } |
| 331 | 331 |
| 332 visitCreateFunction(cps_ir.CreateFunction node) { | 332 visitCreateFunction(cps_ir.CreateFunction node) { |
| 333 return "CreateFunction ${node.definition.element.name}"; | 333 return "CreateFunction ${node.definition.element.name}"; |
| 334 } | 334 } |
| 335 | 335 |
| 336 visitGetMutableVariable(cps_ir.GetMutableVariable node) { | 336 visitGetMutableVariable(cps_ir.GetMutableVariable node) { |
| 337 String variable = names.name(node.variable.definition); | 337 String variable = names.name(node.variable.definition); |
| 338 return 'GetMutableVariable $variable'; | 338 return 'GetMutableVariable $variable'; |
| 339 } | 339 } |
| 340 |
| 341 @override |
| 342 visitReadTypeVariable(cps_ir.ReadTypeVariable node) { |
| 343 return "ReadTypeVariable ${node.variable.element} " |
| 344 "${formatReference(node.target)}"; |
| 345 } |
| 346 |
| 347 @override |
| 348 visitReifyRuntimeType(cps_ir.ReifyRuntimeType node) { |
| 349 return "ReifyRuntimeType ${formatReference(node.value)}"; |
| 350 } |
| 340 } | 351 } |
| 341 | 352 |
| 342 /** | 353 /** |
| 343 * Invents (and remembers) names for Continuations, Parameters, etc. | 354 * Invents (and remembers) names for Continuations, Parameters, etc. |
| 344 * The names must match the conventions used by IR Hydra, e.g. | 355 * The names must match the conventions used by IR Hydra, e.g. |
| 345 * Continuations and Functions must have names of form B### since they | 356 * Continuations and Functions must have names of form B### since they |
| 346 * are visualized as basic blocks. | 357 * are visualized as basic blocks. |
| 347 */ | 358 */ |
| 348 class Names { | 359 class Names { |
| 349 final Map<Object, String> names = {}; | 360 final Map<Object, String> names = {}; |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 } | 578 } |
| 568 visitIsTrue(cps_ir.IsTrue node) { | 579 visitIsTrue(cps_ir.IsTrue node) { |
| 569 unexpectedNode(node); | 580 unexpectedNode(node); |
| 570 } | 581 } |
| 571 visitIdentical(cps_ir.Identical node) { | 582 visitIdentical(cps_ir.Identical node) { |
| 572 unexpectedNode(node); | 583 unexpectedNode(node); |
| 573 } | 584 } |
| 574 visitInterceptor(cps_ir.Interceptor node) { | 585 visitInterceptor(cps_ir.Interceptor node) { |
| 575 unexpectedNode(node); | 586 unexpectedNode(node); |
| 576 } | 587 } |
| 588 |
| 589 @override |
| 590 visitReadTypeVariable(cps_ir.ReadTypeVariable node) { |
| 591 unexpectedNode(node); |
| 592 } |
| 593 |
| 594 @override |
| 595 visitReifyRuntimeType(cps_ir.ReifyRuntimeType node) { |
| 596 unexpectedNode(node); |
| 597 } |
| 577 } | 598 } |
| OLD | NEW |