| 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 } | 524 } |
| 525 END("states"); | 525 END("states"); |
| 526 } | 526 } |
| 527 | 527 |
| 528 { | 528 { |
| 529 BEGIN("HIR"); | 529 BEGIN("HIR"); |
| 530 // Print the block entry. | 530 // Print the block entry. |
| 531 Print("0 0 "); // Required fields "bci" and "use". Unused. | 531 Print("0 0 "); // Required fields "bci" and "use". Unused. |
| 532 PrintInstruction(block_order_[i]); | 532 PrintInstruction(block_order_[i]); |
| 533 // And all the successors until an exit, branch, or a block entry. | 533 // And all the successors until an exit, branch, or a block entry. |
| 534 Instruction* current = block_order_[i]; | 534 BlockEntryInstr* entry = block_order_[i]; |
| 535 for (ForwardInstructionIterator it(current->AsBlockEntry()); | 535 Instruction* current = entry; |
| 536 !it.Done(); | 536 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { |
| 537 it.Advance()) { | |
| 538 current = it.Current(); | 537 current = it.Current(); |
| 539 Print("0 0 "); | 538 Print("0 0 "); |
| 540 PrintInstruction(current); | 539 PrintInstruction(current); |
| 541 } | 540 } |
| 542 if (current->next() != NULL) { | 541 if (current->next() != NULL) { |
| 543 ASSERT(current->next()->IsBlockEntry()); | 542 ASSERT(current->next()->IsBlockEntry()); |
| 544 Print("0 0 _ Goto B%d <|@\n", | 543 Print("0 0 _ Goto B%d <|@\n", |
| 545 current->next()->AsBlockEntry()->block_id()); | 544 current->next()->AsBlockEntry()->block_id()); |
| 546 } | 545 } |
| 547 END("HIR"); | 546 END("HIR"); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 void Environment::PrintTo(BufferFormatter* f) const { | 665 void Environment::PrintTo(BufferFormatter* f) const { |
| 667 f->Print(" env={ "); | 666 f->Print(" env={ "); |
| 668 for (intptr_t i = 0; i < values_.length(); ++i) { | 667 for (intptr_t i = 0; i < values_.length(); ++i) { |
| 669 if (i > 0) f->Print(", "); | 668 if (i > 0) f->Print(", "); |
| 670 values_[i]->PrintTo(f); | 669 values_[i]->PrintTo(f); |
| 671 } | 670 } |
| 672 f->Print(" }"); | 671 f->Print(" }"); |
| 673 } | 672 } |
| 674 | 673 |
| 675 } // namespace dart | 674 } // namespace dart |
| OLD | NEW |