| 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 } | 322 } |
| 323 | 323 |
| 324 visitSetStatic(cps_ir.SetStatic node) { | 324 visitSetStatic(cps_ir.SetStatic node) { |
| 325 String dummy = names.name(node); | 325 String dummy = names.name(node); |
| 326 String element = node.element.name; | 326 String element = node.element.name; |
| 327 String value = formatReference(node.value); | 327 String value = formatReference(node.value); |
| 328 printStmt(dummy, 'SetStatic $element = $value'); | 328 printStmt(dummy, 'SetStatic $element = $value'); |
| 329 visit(node.body); | 329 visit(node.body); |
| 330 } | 330 } |
| 331 | 331 |
| 332 visitGetLazyStatic(cps_ir.GetLazyStatic node) { |
| 333 String dummy = names.name(node); |
| 334 String kont = formatReference(node.continuation); |
| 335 printStmt(dummy, "GetLazyStatic $kont"); |
| 336 } |
| 337 |
| 332 visitCreateBox(cps_ir.CreateBox node) { | 338 visitCreateBox(cps_ir.CreateBox node) { |
| 333 return 'CreateBox'; | 339 return 'CreateBox'; |
| 334 } | 340 } |
| 335 | 341 |
| 336 visitCreateInstance(cps_ir.CreateInstance node) { | 342 visitCreateInstance(cps_ir.CreateInstance node) { |
| 337 String className = node.classElement.name; | 343 String className = node.classElement.name; |
| 338 String arguments = node.arguments.map(formatReference).join(', '); | 344 String arguments = node.arguments.map(formatReference).join(', '); |
| 339 String typeInformation = | 345 String typeInformation = |
| 340 node.typeInformation.map(formatReference).join(', '); | 346 node.typeInformation.map(formatReference).join(', '); |
| 341 return 'CreateInstance $className ($arguments) <$typeInformation>'; | 347 return 'CreateInstance $className ($arguments) <$typeInformation>'; |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 } | 555 } |
| 550 | 556 |
| 551 visitSetField(cps_ir.SetField exp) { | 557 visitSetField(cps_ir.SetField exp) { |
| 552 visit(exp.body); | 558 visit(exp.body); |
| 553 } | 559 } |
| 554 | 560 |
| 555 visitSetStatic(cps_ir.SetStatic exp) { | 561 visitSetStatic(cps_ir.SetStatic exp) { |
| 556 visit(exp.body); | 562 visit(exp.body); |
| 557 } | 563 } |
| 558 | 564 |
| 565 visitGetLazyStatic(cps_ir.GetLazyStatic exp) { |
| 566 addEdgeToContinuation(exp.continuation); |
| 567 } |
| 568 |
| 559 visitDeclareFunction(cps_ir.DeclareFunction exp) { | 569 visitDeclareFunction(cps_ir.DeclareFunction exp) { |
| 560 visit(exp.body); | 570 visit(exp.body); |
| 561 } | 571 } |
| 562 | 572 |
| 563 visitBranch(cps_ir.Branch exp) { | 573 visitBranch(cps_ir.Branch exp) { |
| 564 cps_ir.Continuation trueTarget = exp.trueContinuation.definition; | 574 cps_ir.Continuation trueTarget = exp.trueContinuation.definition; |
| 565 if (!trueTarget.isReturnContinuation) { | 575 if (!trueTarget.isReturnContinuation) { |
| 566 currentBlock.addEdgeTo(getBlock(trueTarget)); | 576 currentBlock.addEdgeTo(getBlock(trueTarget)); |
| 567 } | 577 } |
| 568 cps_ir.Continuation falseTarget = exp.falseContinuation.definition; | 578 cps_ir.Continuation falseTarget = exp.falseContinuation.definition; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 } | 657 } |
| 648 | 658 |
| 649 visitNonTailThrow(cps_ir.NonTailThrow node) { | 659 visitNonTailThrow(cps_ir.NonTailThrow node) { |
| 650 unexpectedNode(node); | 660 unexpectedNode(node); |
| 651 } | 661 } |
| 652 | 662 |
| 653 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) { | 663 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) { |
| 654 unexpectedNode(node); | 664 unexpectedNode(node); |
| 655 } | 665 } |
| 656 } | 666 } |
| OLD | NEW |