| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #include "vm/il_printer.h" | 5 #include "vm/il_printer.h" |
| 6 | 6 |
| 7 #include "vm/intermediate_language.h" | 7 #include "vm/intermediate_language.h" |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 } | 396 } |
| 397 | 397 |
| 398 | 398 |
| 399 void BranchInstr::PrintTo(BufferFormatter* f) const { | 399 void BranchInstr::PrintTo(BufferFormatter* f) const { |
| 400 f->Print(" %s ", DebugName()); | 400 f->Print(" %s ", DebugName()); |
| 401 f->Print("if "); | 401 f->Print("if "); |
| 402 value()->PrintTo(f); | 402 value()->PrintTo(f); |
| 403 if (is_fused_with_comparison()) { | 403 if (is_fused_with_comparison()) { |
| 404 f->Print(" (fused)"); | 404 f->Print(" (fused)"); |
| 405 } | 405 } |
| 406 if (is_negated()) { |
| 407 f->Print(" (negated)"); |
| 408 } |
| 406 f->Print(" goto (%d, %d)", | 409 f->Print(" goto (%d, %d)", |
| 407 true_successor()->block_id(), | 410 true_successor()->block_id(), |
| 408 false_successor()->block_id()); | 411 false_successor()->block_id()); |
| 409 } | 412 } |
| 410 | 413 |
| 411 | 414 |
| 412 void FlowGraphVisualizer::Print(const char* format, ...) { | 415 void FlowGraphVisualizer::Print(const char* format, ...) { |
| 413 char str[120]; | 416 char str[120]; |
| 414 BufferFormatter f(str, sizeof(str)); | 417 BufferFormatter f(str, sizeof(str)); |
| 415 f.Print("%*s", 2 * indent_, ""); | 418 f.Print("%*s", 2 * indent_, ""); |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 f->Print("_ %s ", DebugName()); | 633 f->Print("_ %s ", DebugName()); |
| 631 f->Print("if "); | 634 f->Print("if "); |
| 632 value()->PrintTo(f); | 635 value()->PrintTo(f); |
| 633 f->Print(" goto (B%d, B%d)", | 636 f->Print(" goto (B%d, B%d)", |
| 634 true_successor()->block_id(), | 637 true_successor()->block_id(), |
| 635 false_successor()->block_id()); | 638 false_successor()->block_id()); |
| 636 } | 639 } |
| 637 | 640 |
| 638 | 641 |
| 639 } // namespace dart | 642 } // namespace dart |
| OLD | NEW |