| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 Label* is_instance_lbl, | 118 Label* is_instance_lbl, |
| 119 Label* is_not_instance_lbl); | 119 Label* is_not_instance_lbl); |
| 120 void GenerateStringTypeCheck(Register kClassIdReg, | 120 void GenerateStringTypeCheck(Register kClassIdReg, |
| 121 Label* is_instance_lbl, | 121 Label* is_instance_lbl, |
| 122 Label* is_not_instance_lbl); | 122 Label* is_not_instance_lbl); |
| 123 void GenerateListTypeCheck(Register kClassIdReg, | 123 void GenerateListTypeCheck(Register kClassIdReg, |
| 124 Label* is_instance_lbl); | 124 Label* is_instance_lbl); |
| 125 | 125 |
| 126 void EmitComment(Instruction* instr); | 126 void EmitComment(Instruction* instr); |
| 127 | 127 |
| 128 void EmitOptimizedInstanceCall(ExternalLabel* target_label, |
| 129 const ICData& ic_data, |
| 130 const Array& arguments_descriptor, |
| 131 intptr_t argument_count, |
| 132 intptr_t deopt_id, |
| 133 intptr_t token_pos, |
| 134 LocationSummary* locs); |
| 135 |
| 128 void EmitInstanceCall(ExternalLabel* target_label, | 136 void EmitInstanceCall(ExternalLabel* target_label, |
| 129 const ICData& ic_data, | 137 const ICData& ic_data, |
| 130 const Array& arguments_descriptor, | 138 const Array& arguments_descriptor, |
| 131 intptr_t argument_count, | 139 intptr_t argument_count, |
| 132 intptr_t deopt_id, | 140 intptr_t deopt_id, |
| 133 intptr_t token_pos, | 141 intptr_t token_pos, |
| 134 LocationSummary* locs); | 142 LocationSummary* locs); |
| 135 | 143 |
| 136 void EmitTestAndCall(const ICData& ic_data, | 144 void EmitTestAndCall(const ICData& ic_data, |
| 137 Register class_id_reg, | 145 Register class_id_reg, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 void SaveLiveRegisters(LocationSummary* locs); | 205 void SaveLiveRegisters(LocationSummary* locs); |
| 198 void RestoreLiveRegisters(LocationSummary* locs); | 206 void RestoreLiveRegisters(LocationSummary* locs); |
| 199 | 207 |
| 200 intptr_t CurrentTryIndex() const { | 208 intptr_t CurrentTryIndex() const { |
| 201 if (current_block_ == NULL) { | 209 if (current_block_ == NULL) { |
| 202 return CatchClauseNode::kInvalidTryIndex; | 210 return CatchClauseNode::kInvalidTryIndex; |
| 203 } | 211 } |
| 204 return current_block_->try_index(); | 212 return current_block_->try_index(); |
| 205 } | 213 } |
| 206 | 214 |
| 215 bool may_reoptimize() const { return may_reoptimize_; } |
| 216 |
| 207 static Condition FlipCondition(Condition condition); | 217 static Condition FlipCondition(Condition condition); |
| 208 | 218 |
| 209 static bool EvaluateCondition(Condition condition, intptr_t l, intptr_t r); | 219 static bool EvaluateCondition(Condition condition, intptr_t l, intptr_t r); |
| 210 | 220 |
| 211 // Array/list element address computations. | 221 // Array/list element address computations. |
| 212 static FieldAddress ElementAddressForIntIndex(intptr_t cid, | 222 static FieldAddress ElementAddressForIntIndex(intptr_t cid, |
| 213 Register array, | 223 Register array, |
| 214 intptr_t offset); | 224 intptr_t offset); |
| 215 static FieldAddress ElementAddressForRegIndex(intptr_t cid, | 225 static FieldAddress ElementAddressForRegIndex(intptr_t cid, |
| 216 Register array, | 226 Register array, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 // for convenience. This is not the block's index in the block order, | 314 // for convenience. This is not the block's index in the block order, |
| 305 // which is reverse postorder. | 315 // which is reverse postorder. |
| 306 BlockEntryInstr* current_block_; | 316 BlockEntryInstr* current_block_; |
| 307 ExceptionHandlerList* exception_handlers_list_; | 317 ExceptionHandlerList* exception_handlers_list_; |
| 308 DescriptorList* pc_descriptors_list_; | 318 DescriptorList* pc_descriptors_list_; |
| 309 StackmapTableBuilder* stackmap_table_builder_; | 319 StackmapTableBuilder* stackmap_table_builder_; |
| 310 GrowableArray<BlockInfo*> block_info_; | 320 GrowableArray<BlockInfo*> block_info_; |
| 311 GrowableArray<CompilerDeoptInfo*> deopt_infos_; | 321 GrowableArray<CompilerDeoptInfo*> deopt_infos_; |
| 312 GrowableArray<SlowPathCode*> slow_path_code_; | 322 GrowableArray<SlowPathCode*> slow_path_code_; |
| 313 const bool is_optimizing_; | 323 const bool is_optimizing_; |
| 324 // Set to true if optimized code has IC calls. |
| 325 bool may_reoptimize_; |
| 314 | 326 |
| 315 const Bool& bool_true_; | 327 const Bool& bool_true_; |
| 316 const Bool& bool_false_; | 328 const Bool& bool_false_; |
| 317 const Class& double_class_; | 329 const Class& double_class_; |
| 318 | 330 |
| 319 ParallelMoveResolver parallel_move_resolver_; | 331 ParallelMoveResolver parallel_move_resolver_; |
| 320 | 332 |
| 321 // Currently instructions generate deopt stubs internally by | 333 // Currently instructions generate deopt stubs internally by |
| 322 // calling AddDeoptStub. To communicate deoptimization environment | 334 // calling AddDeoptStub. To communicate deoptimization environment |
| 323 // that should be used when deoptimizing we store it in this variable. | 335 // that should be used when deoptimizing we store it in this variable. |
| 324 // In future AddDeoptStub should be moved out of the instruction template. | 336 // In future AddDeoptStub should be moved out of the instruction template. |
| 325 Environment* pending_deoptimization_env_; | 337 Environment* pending_deoptimization_env_; |
| 326 | 338 |
| 327 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 339 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 328 }; | 340 }; |
| 329 | 341 |
| 330 } // namespace dart | 342 } // namespace dart |
| 331 | 343 |
| 332 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_ | 344 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_ |
| OLD | NEW |