Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Side by Side Diff: vm/il_printer.cc

Issue 10665022: Make IL instructions a doubly-linked list within basic blocks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « vm/flow_graph_optimizer.cc ('k') | vm/intermediate_language.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 19 matching lines...) Expand all
30 30
31 31
32 void FlowGraphPrinter::PrintBlocks() { 32 void FlowGraphPrinter::PrintBlocks() {
33 if (!function_.IsNull()) { 33 if (!function_.IsNull()) {
34 OS::Print("==== %s\n", function_.ToFullyQualifiedCString()); 34 OS::Print("==== %s\n", function_.ToFullyQualifiedCString());
35 } 35 }
36 36
37 for (intptr_t i = 0; i < block_order_.length(); ++i) { 37 for (intptr_t i = 0; i < block_order_.length(); ++i) {
38 // Print the block entry. 38 // Print the block entry.
39 PrintInstruction(block_order_[i]); 39 PrintInstruction(block_order_[i]);
40 Instruction* current = block_order_[i]->StraightLineSuccessor(); 40 Instruction* current = block_order_[i]->successor();
41 // And all the successors until an exit, branch, or a block entry. 41 // And all the successors until an exit, branch, or a block entry.
42 while ((current != NULL) && !current->IsBlockEntry()) { 42 while ((current != NULL) && !current->IsBlockEntry()) {
43 OS::Print("\n"); 43 OS::Print("\n");
44 PrintInstruction(current); 44 PrintInstruction(current);
45 current = current->StraightLineSuccessor(); 45 current = current->successor();
46 } 46 }
47 BlockEntryInstr* successor = 47 BlockEntryInstr* successor =
48 (current == NULL) ? NULL : current->AsBlockEntry(); 48 (current == NULL) ? NULL : current->AsBlockEntry();
49 if (successor != NULL) { 49 if (successor != NULL) {
50 OS::Print(" goto %d", successor->block_id()); 50 OS::Print(" goto %d", successor->block_id());
51 } 51 }
52 OS::Print("\n"); 52 OS::Print("\n");
53 } 53 }
54 } 54 }
55 55
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 } 517 }
518 END("states"); 518 END("states");
519 } 519 }
520 520
521 { 521 {
522 BEGIN("HIR"); 522 BEGIN("HIR");
523 // Print the block entry. 523 // Print the block entry.
524 Print("0 0 "); // Required fields "bci" and "use". Unused. 524 Print("0 0 "); // Required fields "bci" and "use". Unused.
525 Instruction* current = block_order_[i]; 525 Instruction* current = block_order_[i];
526 PrintInstruction(current); 526 PrintInstruction(current);
527 current = current->StraightLineSuccessor(); 527 current = current->successor();
528 // And all the successors until an exit, branch, or a block entry. 528 // And all the successors until an exit, branch, or a block entry.
529 while ((current != NULL) && !current->IsBlockEntry()) { 529 while ((current != NULL) && !current->IsBlockEntry()) {
530 Print("0 0 "); 530 Print("0 0 ");
531 PrintInstruction(current); 531 PrintInstruction(current);
532 current = current->StraightLineSuccessor(); 532 current = current->successor();
533 } 533 }
534 BlockEntryInstr* successor = 534 BlockEntryInstr* successor =
535 (current == NULL) ? NULL : current->AsBlockEntry(); 535 (current == NULL) ? NULL : current->AsBlockEntry();
536 if (successor != NULL) { 536 if (successor != NULL) {
537 Print("0 0 _ Goto B%d <|@\n", successor->block_id()); 537 Print("0 0 _ Goto B%d <|@\n", successor->block_id());
538 } 538 }
539 END("HIR"); 539 END("HIR");
540 } 540 }
541 END("block"); 541 END("block");
542 } 542 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 } 644 }
645 645
646 646
647 void ParallelMoveInstr::PrintToVisualizer(BufferFormatter* f) const { 647 void ParallelMoveInstr::PrintToVisualizer(BufferFormatter* f) const {
648 UNIMPLEMENTED(); 648 UNIMPLEMENTED();
649 } 649 }
650 650
651 651
652 652
653 } // namespace dart 653 } // namespace dart
OLDNEW
« no previous file with comments | « vm/flow_graph_optimizer.cc ('k') | vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698