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 #ifndef VM_IL_PRINTER_H_ | 5 #ifndef VM_IL_PRINTER_H_ |
6 #define VM_IL_PRINTER_H_ | 6 #define VM_IL_PRINTER_H_ |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 22 matching lines...) Expand all Loading... |
33 FlowGraphPrinter(const Function& function, | 33 FlowGraphPrinter(const Function& function, |
34 const GrowableArray<BlockEntryInstr*>& block_order) | 34 const GrowableArray<BlockEntryInstr*>& block_order) |
35 : function_(function), block_order_(block_order) { } | 35 : function_(function), block_order_(block_order) { } |
36 | 36 |
37 virtual ~FlowGraphPrinter() {} | 37 virtual ~FlowGraphPrinter() {} |
38 | 38 |
39 // Print the instructions in a block terminated by newlines. Add "goto N" | 39 // Print the instructions in a block terminated by newlines. Add "goto N" |
40 // to the end of the block if it ends with an unconditional jump to | 40 // to the end of the block if it ends with an unconditional jump to |
41 // another block and that block is not next in reverse postorder. | 41 // another block and that block is not next in reverse postorder. |
42 void PrintBlocks(); | 42 void PrintBlocks(); |
43 void Print(Instruction* instr); | 43 static void PrintInstruction(Instruction* instr); |
| 44 static void PrintComputation(Computation* comp); |
44 | 45 |
45 private: | 46 private: |
46 const Function& function_; | 47 const Function& function_; |
47 const GrowableArray<BlockEntryInstr*>& block_order_; | 48 const GrowableArray<BlockEntryInstr*>& block_order_; |
48 }; | 49 }; |
49 | 50 |
50 } // namespace dart | 51 } // namespace dart |
51 | 52 |
52 #endif // VM_IL_PRINTER_H_ | 53 #endif // VM_IL_PRINTER_H_ |
OLD | NEW |