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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
580 } | 580 } |
581 | 581 |
582 RawArray* edge_counters_array() const { | 582 RawArray* edge_counters_array() const { |
583 return edge_counters_array_.raw(); | 583 return edge_counters_array_.raw(); |
584 } | 584 } |
585 | 585 |
586 RawArray* InliningIdToFunction() const; | 586 RawArray* InliningIdToFunction() const; |
587 | 587 |
588 RawArray* CallerInliningIdMap() const; | 588 RawArray* CallerInliningIdMap() const; |
589 | 589 |
590 CodeSourceMapBuilder* code_source_map_builder() { | |
591 if (code_source_map_builder_ == NULL) { | |
592 code_source_map_builder_ = new CodeSourceMapBuilder(); | |
593 } | |
594 ASSERT(code_source_map_builder_ != NULL); | |
595 return code_source_map_builder_; | |
596 } | |
597 | |
598 void SaveCodeSize(); | |
rmacnak
2016/02/25 23:04:40
Consider BeginCodeSourceRange()/EndCodeSourceRange
Cutch
2016/02/26 15:59:22
Done.
| |
599 bool MaybeEmitCodeSourceMapEntry(TokenPosition token_pos); | |
600 | |
590 private: | 601 private: |
591 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. | 602 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. |
592 | 603 |
593 void EmitFrameEntry(); | 604 void EmitFrameEntry(); |
594 | 605 |
595 void AddStaticCallTarget(const Function& function); | 606 void AddStaticCallTarget(const Function& function); |
596 | 607 |
597 void GenerateDeferredCode(); | 608 void GenerateDeferredCode(); |
598 | 609 |
599 void EmitInstructionPrologue(Instruction* instr); | 610 void EmitInstructionPrologue(Instruction* instr); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
737 GrowableArray<Representation> frame_state_; | 748 GrowableArray<Representation> frame_state_; |
738 #endif | 749 #endif |
739 | 750 |
740 // Compiler specific per-block state. Indexed by postorder block number | 751 // Compiler specific per-block state. Indexed by postorder block number |
741 // for convenience. This is not the block's index in the block order, | 752 // for convenience. This is not the block's index in the block order, |
742 // which is reverse postorder. | 753 // which is reverse postorder. |
743 BlockEntryInstr* current_block_; | 754 BlockEntryInstr* current_block_; |
744 ExceptionHandlerList* exception_handlers_list_; | 755 ExceptionHandlerList* exception_handlers_list_; |
745 DescriptorList* pc_descriptors_list_; | 756 DescriptorList* pc_descriptors_list_; |
746 StackmapTableBuilder* stackmap_table_builder_; | 757 StackmapTableBuilder* stackmap_table_builder_; |
758 CodeSourceMapBuilder* code_source_map_builder_; | |
759 intptr_t saved_code_size_; | |
747 GrowableArray<BlockInfo*> block_info_; | 760 GrowableArray<BlockInfo*> block_info_; |
748 GrowableArray<CompilerDeoptInfo*> deopt_infos_; | 761 GrowableArray<CompilerDeoptInfo*> deopt_infos_; |
749 GrowableArray<SlowPathCode*> slow_path_code_; | 762 GrowableArray<SlowPathCode*> slow_path_code_; |
750 // Stores static call targets as well as stub targets. | 763 // Stores static call targets as well as stub targets. |
751 // TODO(srdjan): Evaluate if we should store allocation stub targets into a | 764 // TODO(srdjan): Evaluate if we should store allocation stub targets into a |
752 // separate table? | 765 // separate table? |
753 GrowableArray<StaticCallsStruct*> static_calls_target_table_; | 766 GrowableArray<StaticCallsStruct*> static_calls_target_table_; |
754 const bool is_optimizing_; | 767 const bool is_optimizing_; |
755 // Set to true if optimized code has IC calls. | 768 // Set to true if optimized code has IC calls. |
756 bool may_reoptimize_; | 769 bool may_reoptimize_; |
(...skipping 25 matching lines...) Expand all Loading... | |
782 Array& inlined_code_intervals_; | 795 Array& inlined_code_intervals_; |
783 const GrowableArray<const Function*>& inline_id_to_function_; | 796 const GrowableArray<const Function*>& inline_id_to_function_; |
784 const GrowableArray<intptr_t>& caller_inline_id_; | 797 const GrowableArray<intptr_t>& caller_inline_id_; |
785 | 798 |
786 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 799 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
787 }; | 800 }; |
788 | 801 |
789 } // namespace dart | 802 } // namespace dart |
790 | 803 |
791 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 804 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
OLD | NEW |