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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
655 } | 655 } |
656 | 656 |
657 #if defined(DEBUG) | 657 #if defined(DEBUG) |
658 void FrameStateUpdateWith(Instruction* instr); | 658 void FrameStateUpdateWith(Instruction* instr); |
659 void FrameStatePush(Definition* defn); | 659 void FrameStatePush(Definition* defn); |
660 void FrameStatePop(intptr_t count); | 660 void FrameStatePop(intptr_t count); |
661 bool FrameStateIsSafeToCall(); | 661 bool FrameStateIsSafeToCall(); |
662 void FrameStateClear(); | 662 void FrameStateClear(); |
663 #endif | 663 #endif |
664 | 664 |
665 struct StaticCallsStruct { | |
666 intptr_t offset; | |
667 const Function* function; | |
koda
2015/08/20 18:13:18
For readability, please comment (and preferably al
srdjan
2015/08/20 21:37:45
Discussed offline, adding comment.
| |
668 const Code* code; | |
669 StaticCallsStruct(intptr_t offset_arg, | |
670 const Function* function_arg, | |
671 const Code* code_arg) | |
672 : offset(offset_arg), function(function_arg), code(code_arg) {} | |
673 }; | |
674 | |
665 Isolate* isolate_; | 675 Isolate* isolate_; |
666 Zone* zone_; | 676 Zone* zone_; |
667 Assembler* assembler_; | 677 Assembler* assembler_; |
668 const ParsedFunction& parsed_function_; | 678 const ParsedFunction& parsed_function_; |
669 const FlowGraph& flow_graph_; | 679 const FlowGraph& flow_graph_; |
670 const GrowableArray<BlockEntryInstr*>& block_order_; | 680 const GrowableArray<BlockEntryInstr*>& block_order_; |
671 | 681 |
672 #if defined(DEBUG) | 682 #if defined(DEBUG) |
673 GrowableArray<Representation> frame_state_; | 683 GrowableArray<Representation> frame_state_; |
674 #endif | 684 #endif |
675 | 685 |
676 // Compiler specific per-block state. Indexed by postorder block number | 686 // Compiler specific per-block state. Indexed by postorder block number |
677 // for convenience. This is not the block's index in the block order, | 687 // for convenience. This is not the block's index in the block order, |
678 // which is reverse postorder. | 688 // which is reverse postorder. |
679 BlockEntryInstr* current_block_; | 689 BlockEntryInstr* current_block_; |
680 ExceptionHandlerList* exception_handlers_list_; | 690 ExceptionHandlerList* exception_handlers_list_; |
681 DescriptorList* pc_descriptors_list_; | 691 DescriptorList* pc_descriptors_list_; |
682 StackmapTableBuilder* stackmap_table_builder_; | 692 StackmapTableBuilder* stackmap_table_builder_; |
683 GrowableArray<BlockInfo*> block_info_; | 693 GrowableArray<BlockInfo*> block_info_; |
684 GrowableArray<CompilerDeoptInfo*> deopt_infos_; | 694 GrowableArray<CompilerDeoptInfo*> deopt_infos_; |
685 GrowableArray<SlowPathCode*> slow_path_code_; | 695 GrowableArray<SlowPathCode*> slow_path_code_; |
686 // Stores: [code offset, function or null, null(code)]. | |
687 // Stores static call targets as well as stub targets. | 696 // Stores static call targets as well as stub targets. |
688 // TODO(srdjan): Evaluate if we should store allocation stub targets into a | 697 // TODO(srdjan): Evaluate if we should store allocation stub targets into a |
689 // separate table? | 698 // separate table? |
690 const GrowableObjectArray& static_calls_target_table_; | 699 GrowableArray<StaticCallsStruct> static_calls_target_table_; |
691 const bool is_optimizing_; | 700 const bool is_optimizing_; |
692 // Set to true if optimized code has IC calls. | 701 // Set to true if optimized code has IC calls. |
693 bool may_reoptimize_; | 702 bool may_reoptimize_; |
694 // True while emitting intrinsic code. | 703 // True while emitting intrinsic code. |
695 bool intrinsic_mode_; | 704 bool intrinsic_mode_; |
696 Label intrinsic_slow_path_label_; | 705 Label intrinsic_slow_path_label_; |
697 | 706 |
698 const Class& double_class_; | 707 const Class& double_class_; |
699 const Class& mint_class_; | 708 const Class& mint_class_; |
700 const Class& float32x4_class_; | 709 const Class& float32x4_class_; |
(...skipping 18 matching lines...) Expand all Loading... | |
719 Array& inlined_code_intervals_; | 728 Array& inlined_code_intervals_; |
720 const GrowableArray<const Function*>& inline_id_to_function_; | 729 const GrowableArray<const Function*>& inline_id_to_function_; |
721 const GrowableArray<intptr_t>& caller_inline_id_; | 730 const GrowableArray<intptr_t>& caller_inline_id_; |
722 | 731 |
723 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 732 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
724 }; | 733 }; |
725 | 734 |
726 } // namespace dart | 735 } // namespace dart |
727 | 736 |
728 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 737 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
OLD | NEW |