Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: runtime/vm/flow_graph_compiler.h

Issue 1740503002: Build CodeSourceMap for each code object (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 } 587 }
588 588
589 RawArray* edge_counters_array() const { 589 RawArray* edge_counters_array() const {
590 return edge_counters_array_.raw(); 590 return edge_counters_array_.raw();
591 } 591 }
592 592
593 RawArray* InliningIdToFunction() const; 593 RawArray* InliningIdToFunction() const;
594 RawArray* InliningIdToTokenPos() const; 594 RawArray* InliningIdToTokenPos() const;
595 RawArray* CallerInliningIdMap() const; 595 RawArray* CallerInliningIdMap() const;
596 596
597 CodeSourceMapBuilder* code_source_map_builder() {
598 if (code_source_map_builder_ == NULL) {
599 code_source_map_builder_ = new CodeSourceMapBuilder();
600 }
601 ASSERT(code_source_map_builder_ != NULL);
602 return code_source_map_builder_;
603 }
604
605 void BeginCodeSourceRange();
606 bool EndCodeSourceRange(TokenPosition token_pos);
607
597 private: 608 private:
598 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. 609 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_.
599 610
600 void EmitFrameEntry(); 611 void EmitFrameEntry();
601 612
602 void AddStaticCallTarget(const Function& function); 613 void AddStaticCallTarget(const Function& function);
603 614
604 void GenerateDeferredCode(); 615 void GenerateDeferredCode();
605 616
606 void EmitInstructionPrologue(Instruction* instr); 617 void EmitInstructionPrologue(Instruction* instr);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 GrowableArray<Representation> frame_state_; 755 GrowableArray<Representation> frame_state_;
745 #endif 756 #endif
746 757
747 // Compiler specific per-block state. Indexed by postorder block number 758 // Compiler specific per-block state. Indexed by postorder block number
748 // for convenience. This is not the block's index in the block order, 759 // for convenience. This is not the block's index in the block order,
749 // which is reverse postorder. 760 // which is reverse postorder.
750 BlockEntryInstr* current_block_; 761 BlockEntryInstr* current_block_;
751 ExceptionHandlerList* exception_handlers_list_; 762 ExceptionHandlerList* exception_handlers_list_;
752 DescriptorList* pc_descriptors_list_; 763 DescriptorList* pc_descriptors_list_;
753 StackmapTableBuilder* stackmap_table_builder_; 764 StackmapTableBuilder* stackmap_table_builder_;
765 CodeSourceMapBuilder* code_source_map_builder_;
766 intptr_t saved_code_size_;
754 GrowableArray<BlockInfo*> block_info_; 767 GrowableArray<BlockInfo*> block_info_;
755 GrowableArray<CompilerDeoptInfo*> deopt_infos_; 768 GrowableArray<CompilerDeoptInfo*> deopt_infos_;
756 GrowableArray<SlowPathCode*> slow_path_code_; 769 GrowableArray<SlowPathCode*> slow_path_code_;
757 // Stores static call targets as well as stub targets. 770 // Stores static call targets as well as stub targets.
758 // TODO(srdjan): Evaluate if we should store allocation stub targets into a 771 // TODO(srdjan): Evaluate if we should store allocation stub targets into a
759 // separate table? 772 // separate table?
760 GrowableArray<StaticCallsStruct*> static_calls_target_table_; 773 GrowableArray<StaticCallsStruct*> static_calls_target_table_;
761 const bool is_optimizing_; 774 const bool is_optimizing_;
762 // Set to true if optimized code has IC calls. 775 // Set to true if optimized code has IC calls.
763 bool may_reoptimize_; 776 bool may_reoptimize_;
(...skipping 26 matching lines...) Expand all
790 const GrowableArray<const Function*>& inline_id_to_function_; 803 const GrowableArray<const Function*>& inline_id_to_function_;
791 const GrowableArray<TokenPosition>& inline_id_to_token_pos_; 804 const GrowableArray<TokenPosition>& inline_id_to_token_pos_;
792 const GrowableArray<intptr_t>& caller_inline_id_; 805 const GrowableArray<intptr_t>& caller_inline_id_;
793 806
794 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); 807 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler);
795 }; 808 };
796 809
797 } // namespace dart 810 } // namespace dart
798 811
799 #endif // VM_FLOW_GRAPH_COMPILER_H_ 812 #endif // VM_FLOW_GRAPH_COMPILER_H_
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698