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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 void CompileGraph(); | 34 void CompileGraph(); |
35 | 35 |
36 // Infrastructure copied from class CodeGenerator or stubbed out. | 36 // Infrastructure copied from class CodeGenerator or stubbed out. |
37 void FinalizePcDescriptors(const Code& code); | 37 void FinalizePcDescriptors(const Code& code); |
38 void FinalizeStackmaps(const Code& code); | 38 void FinalizeStackmaps(const Code& code); |
39 void FinalizeVarDescriptors(const Code& code); | 39 void FinalizeVarDescriptors(const Code& code); |
40 void FinalizeExceptionHandlers(const Code& code); | 40 void FinalizeExceptionHandlers(const Code& code); |
41 void FinalizeComments(const Code& code); | 41 void FinalizeComments(const Code& code); |
42 | 42 |
| 43 Assembler* assembler() const { return assembler_; } |
| 44 |
43 private: | 45 private: |
44 static const int kLocalsOffsetFromFP = (-1 * kWordSize); | 46 static const int kLocalsOffsetFromFP = (-1 * kWordSize); |
45 | 47 |
46 // Constructor is lighweight, major initialization work should occur here. | 48 // Constructor is lighweight, major initialization work should occur here. |
47 // This makes it easier to measure time spent in the compiler. | 49 // This makes it easier to measure time spent in the compiler. |
48 void InitCompiler(); | 50 void InitCompiler(); |
49 | 51 |
50 struct BlockInfo : public ZoneAllocated { | 52 struct BlockInfo : public ZoneAllocated { |
51 public: | 53 public: |
52 BlockInfo() : label() { } | 54 BlockInfo() : label() { } |
(...skipping 17 matching lines...) Expand all Loading... |
70 // Each visit function compiles a type of instruction. | 72 // Each visit function compiles a type of instruction. |
71 #define DECLARE_VISIT_INSTRUCTION(ShortName) \ | 73 #define DECLARE_VISIT_INSTRUCTION(ShortName) \ |
72 virtual void Visit##ShortName(ShortName##Instr* instr); | 74 virtual void Visit##ShortName(ShortName##Instr* instr); |
73 | 75 |
74 FOR_EACH_COMPUTATION(DECLARE_VISIT_COMPUTATION) | 76 FOR_EACH_COMPUTATION(DECLARE_VISIT_COMPUTATION) |
75 FOR_EACH_INSTRUCTION(DECLARE_VISIT_INSTRUCTION) | 77 FOR_EACH_INSTRUCTION(DECLARE_VISIT_INSTRUCTION) |
76 | 78 |
77 #undef DECLARE_VISIT_COMPUTATION | 79 #undef DECLARE_VISIT_COMPUTATION |
78 #undef DECLARE_VISIT_INSTRUCTION | 80 #undef DECLARE_VISIT_INSTRUCTION |
79 | 81 |
| 82 void EmitInstructionPrologue(Instruction* instr); |
| 83 void LoadInputs(LocationSummary* summary); |
| 84 |
80 // Emit code to load a Value into register 'dst'. | 85 // Emit code to load a Value into register 'dst'. |
81 void LoadValue(Register dst, Value* value); | 86 void LoadValue(Register dst, Value* value); |
82 | 87 |
83 void EmitComment(Instruction* instr); | 88 void EmitComment(Instruction* instr); |
84 | 89 |
85 // Emit an instance call. | 90 // Emit an instance call. |
86 void EmitInstanceCall(intptr_t cid, | 91 void EmitInstanceCall(intptr_t cid, |
87 intptr_t token_index, | 92 intptr_t token_index, |
88 intptr_t try_index, | 93 intptr_t try_index, |
89 const String& function_name, | 94 const String& function_name, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 DescriptorList* pc_descriptors_list_; | 153 DescriptorList* pc_descriptors_list_; |
149 ExceptionHandlerList* exception_handlers_list_; | 154 ExceptionHandlerList* exception_handlers_list_; |
150 const bool is_optimizing_; | 155 const bool is_optimizing_; |
151 | 156 |
152 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 157 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
153 }; | 158 }; |
154 | 159 |
155 } // namespace dart | 160 } // namespace dart |
156 | 161 |
157 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_ | 162 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_ |
OLD | NEW |