| 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_FLOW_GRAPH_COMPILER_X64_H_ | 5 #ifndef VM_FLOW_GRAPH_COMPILER_X64_H_ |
| 6 #define VM_FLOW_GRAPH_COMPILER_X64_H_ | 6 #define VM_FLOW_GRAPH_COMPILER_X64_H_ |
| 7 | 7 |
| 8 #ifndef VM_FLOW_GRAPH_COMPILER_H_ | 8 #ifndef VM_FLOW_GRAPH_COMPILER_H_ |
| 9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_x64.h. | 9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_x64.h. |
| 10 #endif | 10 #endif |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 const GrowableArray<BlockEntryInstr*>* blocks) | 24 const GrowableArray<BlockEntryInstr*>* blocks) |
| 25 : assembler_(assembler), | 25 : assembler_(assembler), |
| 26 parsed_function_(parsed_function), | 26 parsed_function_(parsed_function), |
| 27 blocks_(blocks), | 27 blocks_(blocks), |
| 28 pc_descriptors_list_(new CodeGenerator::DescriptorList()) { } | 28 pc_descriptors_list_(new CodeGenerator::DescriptorList()) { } |
| 29 | 29 |
| 30 virtual ~FlowGraphCompiler() { } | 30 virtual ~FlowGraphCompiler() { } |
| 31 | 31 |
| 32 void CompileGraph(); | 32 void CompileGraph(); |
| 33 | 33 |
| 34 // Infrastructure copied from class CodeGenerator or stubbed out. |
| 35 void FinalizePcDescriptors(const Code& code); |
| 36 void FinalizeVarDescriptors(const Code& code); |
| 37 void FinalizeExceptionHandlers(const Code& code); |
| 38 |
| 34 private: | 39 private: |
| 35 // Bail out of the flow graph compiler. Does not return to the caller. | 40 // Bail out of the flow graph compiler. Does not return to the caller. |
| 36 void Bailout(const char* reason); | 41 void Bailout(const char* reason); |
| 37 | 42 |
| 38 // Each visit function compiles a type of instruction. | 43 // Each visit function compiles a type of instruction. |
| 39 #define DECLARE_VISIT(type) \ | 44 #define DECLARE_VISIT(type) \ |
| 40 virtual void Visit##type(type##Instr* instr); | 45 virtual void Visit##type(type##Instr* instr); |
| 41 FOR_EACH_INSTRUCTION(DECLARE_VISIT) | 46 FOR_EACH_INSTRUCTION(DECLARE_VISIT) |
| 42 #undef DECLARE_VISIT | 47 #undef DECLARE_VISIT |
| 43 | 48 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 57 const GrowableArray<BlockEntryInstr*>* blocks_; | 62 const GrowableArray<BlockEntryInstr*>* blocks_; |
| 58 | 63 |
| 59 CodeGenerator::DescriptorList* pc_descriptors_list_; | 64 CodeGenerator::DescriptorList* pc_descriptors_list_; |
| 60 | 65 |
| 61 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 66 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 62 }; | 67 }; |
| 63 | 68 |
| 64 } // namespace dart | 69 } // namespace dart |
| 65 | 70 |
| 66 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_ | 71 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_ |
| OLD | NEW |