| 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 exception()->PrintTo(f); | 379 exception()->PrintTo(f); |
| 380 f->Print(", "); | 380 f->Print(", "); |
| 381 stack_trace()->PrintTo(f); | 381 stack_trace()->PrintTo(f); |
| 382 } | 382 } |
| 383 | 383 |
| 384 | 384 |
| 385 void BranchInstr::PrintTo(BufferFormatter* f) const { | 385 void BranchInstr::PrintTo(BufferFormatter* f) const { |
| 386 f->Print(" %s ", DebugName()); | 386 f->Print(" %s ", DebugName()); |
| 387 f->Print("if "); | 387 f->Print("if "); |
| 388 value()->PrintTo(f); | 388 value()->PrintTo(f); |
| 389 if (is_fused_with_comparison()) { |
| 390 f->Print(" (fused)"); |
| 391 } |
| 389 f->Print(" goto (%d, %d)", | 392 f->Print(" goto (%d, %d)", |
| 390 true_successor()->block_id(), | 393 true_successor()->block_id(), |
| 391 false_successor()->block_id()); | 394 false_successor()->block_id()); |
| 392 } | 395 } |
| 393 | 396 |
| 394 | 397 |
| 395 void FlowGraphVisualizer::Print(const char* format, ...) { | 398 void FlowGraphVisualizer::Print(const char* format, ...) { |
| 396 char str[120]; | 399 char str[120]; |
| 397 BufferFormatter f(str, sizeof(str)); | 400 BufferFormatter f(str, sizeof(str)); |
| 398 f.Print("%*s", 2 * indent_, ""); | 401 f.Print("%*s", 2 * indent_, ""); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 f->Print("_ %s ", DebugName()); | 572 f->Print("_ %s ", DebugName()); |
| 570 f->Print("if "); | 573 f->Print("if "); |
| 571 value()->PrintTo(f); | 574 value()->PrintTo(f); |
| 572 f->Print(" goto (B%d, B%d)", | 575 f->Print(" goto (B%d, B%d)", |
| 573 true_successor()->block_id(), | 576 true_successor()->block_id(), |
| 574 false_successor()->block_id()); | 577 false_successor()->block_id()); |
| 575 } | 578 } |
| 576 | 579 |
| 577 | 580 |
| 578 } // namespace dart | 581 } // namespace dart |
| OLD | NEW |