| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 void AddDeoptIndexAtCall(intptr_t deopt_id, intptr_t token_pos); | 185 void AddDeoptIndexAtCall(intptr_t deopt_id, intptr_t token_pos); |
| 186 | 186 |
| 187 void AddSlowPathCode(SlowPathCode* slow_path); | 187 void AddSlowPathCode(SlowPathCode* slow_path); |
| 188 | 188 |
| 189 void FinalizeExceptionHandlers(const Code& code); | 189 void FinalizeExceptionHandlers(const Code& code); |
| 190 void FinalizePcDescriptors(const Code& code); | 190 void FinalizePcDescriptors(const Code& code); |
| 191 void FinalizeDeoptInfo(const Code& code); | 191 void FinalizeDeoptInfo(const Code& code); |
| 192 void FinalizeStackmaps(const Code& code); | 192 void FinalizeStackmaps(const Code& code); |
| 193 void FinalizeVarDescriptors(const Code& code); | 193 void FinalizeVarDescriptors(const Code& code); |
| 194 void FinalizeComments(const Code& code); | 194 void FinalizeComments(const Code& code); |
| 195 void FinalizeStaticCallTargetsTable(const Code& code); |
| 195 | 196 |
| 196 const Bool& bool_true() const { return bool_true_; } | 197 const Bool& bool_true() const { return bool_true_; } |
| 197 const Bool& bool_false() const { return bool_false_; } | 198 const Bool& bool_false() const { return bool_false_; } |
| 198 const Class& double_class() const { return double_class_; } | 199 const Class& double_class() const { return double_class_; } |
| 199 | 200 |
| 200 // Returns true if the compiled function has a finally clause. | 201 // Returns true if the compiled function has a finally clause. |
| 201 bool HasFinally() const; | 202 bool HasFinally() const; |
| 202 | 203 |
| 203 static const int kLocalsOffsetFromFP = (-1 * kWordSize); | 204 static const int kLocalsOffsetFromFP = (-1 * kWordSize); |
| 204 | 205 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 220 | 221 |
| 221 // Array/list element address computations. | 222 // Array/list element address computations. |
| 222 static FieldAddress ElementAddressForIntIndex(intptr_t cid, | 223 static FieldAddress ElementAddressForIntIndex(intptr_t cid, |
| 223 Register array, | 224 Register array, |
| 224 intptr_t offset); | 225 intptr_t offset); |
| 225 static FieldAddress ElementAddressForRegIndex(intptr_t cid, | 226 static FieldAddress ElementAddressForRegIndex(intptr_t cid, |
| 226 Register array, | 227 Register array, |
| 227 Register index); | 228 Register index); |
| 228 | 229 |
| 229 private: | 230 private: |
| 231 void AddStaticCallTarget(const Function& function); |
| 232 |
| 230 void GenerateDeferredCode(); | 233 void GenerateDeferredCode(); |
| 231 | 234 |
| 232 void EmitInstructionPrologue(Instruction* instr); | 235 void EmitInstructionPrologue(Instruction* instr); |
| 233 void EmitInstructionEpilogue(Instruction* instr); | 236 void EmitInstructionEpilogue(Instruction* instr); |
| 234 | 237 |
| 235 // Emit code to load a Value into register 'dst'. | 238 // Emit code to load a Value into register 'dst'. |
| 236 void LoadValue(Register dst, Value* value); | 239 void LoadValue(Register dst, Value* value); |
| 237 | 240 |
| 238 void EmitStaticCall(const Function& function, | 241 void EmitStaticCall(const Function& function, |
| 239 const Array& arguments_descriptor, | 242 const Array& arguments_descriptor, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 // Compiler specific per-block state. Indexed by postorder block number | 316 // Compiler specific per-block state. Indexed by postorder block number |
| 314 // for convenience. This is not the block's index in the block order, | 317 // for convenience. This is not the block's index in the block order, |
| 315 // which is reverse postorder. | 318 // which is reverse postorder. |
| 316 BlockEntryInstr* current_block_; | 319 BlockEntryInstr* current_block_; |
| 317 ExceptionHandlerList* exception_handlers_list_; | 320 ExceptionHandlerList* exception_handlers_list_; |
| 318 DescriptorList* pc_descriptors_list_; | 321 DescriptorList* pc_descriptors_list_; |
| 319 StackmapTableBuilder* stackmap_table_builder_; | 322 StackmapTableBuilder* stackmap_table_builder_; |
| 320 GrowableArray<BlockInfo*> block_info_; | 323 GrowableArray<BlockInfo*> block_info_; |
| 321 GrowableArray<CompilerDeoptInfo*> deopt_infos_; | 324 GrowableArray<CompilerDeoptInfo*> deopt_infos_; |
| 322 GrowableArray<SlowPathCode*> slow_path_code_; | 325 GrowableArray<SlowPathCode*> slow_path_code_; |
| 326 // Stores tuples: code offset, function. |
| 327 const GrowableObjectArray& static_calls_target_table_; |
| 323 const bool is_optimizing_; | 328 const bool is_optimizing_; |
| 324 // Set to true if optimized code has IC calls. | 329 // Set to true if optimized code has IC calls. |
| 325 bool may_reoptimize_; | 330 bool may_reoptimize_; |
| 326 | 331 |
| 327 const Bool& bool_true_; | 332 const Bool& bool_true_; |
| 328 const Bool& bool_false_; | 333 const Bool& bool_false_; |
| 329 const Class& double_class_; | 334 const Class& double_class_; |
| 330 | 335 |
| 331 ParallelMoveResolver parallel_move_resolver_; | 336 ParallelMoveResolver parallel_move_resolver_; |
| 332 | 337 |
| 333 // Currently instructions generate deopt stubs internally by | 338 // Currently instructions generate deopt stubs internally by |
| 334 // calling AddDeoptStub. To communicate deoptimization environment | 339 // calling AddDeoptStub. To communicate deoptimization environment |
| 335 // that should be used when deoptimizing we store it in this variable. | 340 // that should be used when deoptimizing we store it in this variable. |
| 336 // In future AddDeoptStub should be moved out of the instruction template. | 341 // In future AddDeoptStub should be moved out of the instruction template. |
| 337 Environment* pending_deoptimization_env_; | 342 Environment* pending_deoptimization_env_; |
| 338 | 343 |
| 339 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 344 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 340 }; | 345 }; |
| 341 | 346 |
| 342 } // namespace dart | 347 } // namespace dart |
| 343 | 348 |
| 344 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_ | 349 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_ |
| OLD | NEW |