Chromium Code Reviews| 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_H_ | 5 #ifndef VM_FLOW_GRAPH_COMPILER_H_ |
| 6 #define VM_FLOW_GRAPH_COMPILER_H_ | 6 #define VM_FLOW_GRAPH_COMPILER_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/code_descriptors.h" | 10 #include "vm/code_descriptors.h" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 } | 285 } |
| 286 BlockEntryInstr* current_block() const { return current_block_; } | 286 BlockEntryInstr* current_block() const { return current_block_; } |
| 287 void set_current_block(BlockEntryInstr* value) { | 287 void set_current_block(BlockEntryInstr* value) { |
| 288 current_block_ = value; | 288 current_block_ = value; |
| 289 } | 289 } |
| 290 static bool CanOptimize(); | 290 static bool CanOptimize(); |
| 291 bool CanOptimizeFunction() const; | 291 bool CanOptimizeFunction() const; |
| 292 bool CanOSRFunction() const; | 292 bool CanOSRFunction() const; |
| 293 bool is_optimizing() const { return is_optimizing_; } | 293 bool is_optimizing() const { return is_optimizing_; } |
| 294 | 294 |
| 295 void EnterIntrinsicMode(); | |
| 296 void ExitIntrinsicMode(); | |
| 297 bool intrinsic_mode() const { return intrinsic_mode_; } | |
| 298 | |
| 295 bool ForceSlowPathForStackOverflow() const; | 299 bool ForceSlowPathForStackOverflow() const; |
| 296 | 300 |
| 297 const GrowableArray<BlockInfo*>& block_info() const { return block_info_; } | 301 const GrowableArray<BlockInfo*>& block_info() const { return block_info_; } |
| 298 ParallelMoveResolver* parallel_move_resolver() { | 302 ParallelMoveResolver* parallel_move_resolver() { |
| 299 return ¶llel_move_resolver_; | 303 return ¶llel_move_resolver_; |
| 300 } | 304 } |
| 301 | 305 |
| 302 // Constructor is lighweight, major initialization work should occur here. | 306 // Constructor is lighweight, major initialization work should occur here. |
| 303 // This makes it easier to measure time spent in the compiler. | 307 // This makes it easier to measure time spent in the compiler. |
| 304 void InitCompiler(); | 308 void InitCompiler(); |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 613 DescriptorList* pc_descriptors_list_; | 617 DescriptorList* pc_descriptors_list_; |
| 614 StackmapTableBuilder* stackmap_table_builder_; | 618 StackmapTableBuilder* stackmap_table_builder_; |
| 615 GrowableArray<BlockInfo*> block_info_; | 619 GrowableArray<BlockInfo*> block_info_; |
| 616 GrowableArray<CompilerDeoptInfo*> deopt_infos_; | 620 GrowableArray<CompilerDeoptInfo*> deopt_infos_; |
| 617 GrowableArray<SlowPathCode*> slow_path_code_; | 621 GrowableArray<SlowPathCode*> slow_path_code_; |
| 618 // Stores: [code offset, function, null(code)]. | 622 // Stores: [code offset, function, null(code)]. |
| 619 const GrowableObjectArray& static_calls_target_table_; | 623 const GrowableObjectArray& static_calls_target_table_; |
| 620 const bool is_optimizing_; | 624 const bool is_optimizing_; |
| 621 // Set to true if optimized code has IC calls. | 625 // Set to true if optimized code has IC calls. |
| 622 bool may_reoptimize_; | 626 bool may_reoptimize_; |
| 627 // True while emitting intrinsic code. | |
| 628 bool intrinsic_mode_; | |
|
srdjan
2014/09/08 17:34:06
since bool, maybe rename to is_intrinsic_mode?
| |
| 629 Label intrinsic_deopt_label_; | |
| 623 | 630 |
| 624 const Class& double_class_; | 631 const Class& double_class_; |
| 625 const Class& mint_class_; | 632 const Class& mint_class_; |
| 626 const Class& float32x4_class_; | 633 const Class& float32x4_class_; |
| 627 const Class& float64x2_class_; | 634 const Class& float64x2_class_; |
| 628 const Class& int32x4_class_; | 635 const Class& int32x4_class_; |
| 629 const Class& list_class_; | 636 const Class& list_class_; |
| 630 | 637 |
| 631 ParallelMoveResolver parallel_move_resolver_; | 638 ParallelMoveResolver parallel_move_resolver_; |
| 632 | 639 |
| 633 // Currently instructions generate deopt stubs internally by | 640 // Currently instructions generate deopt stubs internally by |
| 634 // calling AddDeoptStub. To communicate deoptimization environment | 641 // calling AddDeoptStub. To communicate deoptimization environment |
| 635 // that should be used when deoptimizing we store it in this variable. | 642 // that should be used when deoptimizing we store it in this variable. |
| 636 // In future AddDeoptStub should be moved out of the instruction template. | 643 // In future AddDeoptStub should be moved out of the instruction template. |
| 637 Environment* pending_deoptimization_env_; | 644 Environment* pending_deoptimization_env_; |
| 638 | 645 |
| 639 intptr_t entry_patch_pc_offset_; | 646 intptr_t entry_patch_pc_offset_; |
| 640 intptr_t patch_code_pc_offset_; | 647 intptr_t patch_code_pc_offset_; |
| 641 intptr_t lazy_deopt_pc_offset_; | 648 intptr_t lazy_deopt_pc_offset_; |
| 642 | 649 |
| 643 ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data_; | 650 ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data_; |
| 644 | 651 |
| 645 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 652 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 646 }; | 653 }; |
| 647 | 654 |
| 648 } // namespace dart | 655 } // namespace dart |
| 649 | 656 |
| 650 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 657 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
| OLD | NEW |