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

Side by Side Diff: src/compiler/instruction.h

Issue 1053123006: Calculate blocks needing a frame and frame (de)construction sites. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added missing files Created 5 years, 7 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 | « src/compiler/frame-elider.cc ('k') | src/compiler/instruction.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_INSTRUCTION_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_H_
6 #define V8_COMPILER_INSTRUCTION_H_ 6 #define V8_COMPILER_INSTRUCTION_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 Successors& successors() { return successors_; } 921 Successors& successors() { return successors_; }
922 const Successors& successors() const { return successors_; } 922 const Successors& successors() const { return successors_; }
923 size_t SuccessorCount() const { return successors_.size(); } 923 size_t SuccessorCount() const { return successors_.size(); }
924 924
925 typedef ZoneVector<PhiInstruction*> PhiInstructions; 925 typedef ZoneVector<PhiInstruction*> PhiInstructions;
926 const PhiInstructions& phis() const { return phis_; } 926 const PhiInstructions& phis() const { return phis_; }
927 void AddPhi(PhiInstruction* phi) { phis_.push_back(phi); } 927 void AddPhi(PhiInstruction* phi) { phis_.push_back(phi); }
928 928
929 void set_ao_number(RpoNumber ao_number) { ao_number_ = ao_number; } 929 void set_ao_number(RpoNumber ao_number) { ao_number_ = ao_number; }
930 930
931 bool needs_frame() const { return needs_frame_; }
932 void mark_needs_frame() { needs_frame_ = true; }
933
934 bool must_construct_frame() const { return must_construct_frame_; }
935 void mark_must_construct_frame() { must_construct_frame_ = true; }
936
937 bool must_deconstruct_frame() const { return must_deconstruct_frame_; }
938 void mark_must_deconstruct_frame() { must_deconstruct_frame_ = true; }
939
931 private: 940 private:
932 Successors successors_; 941 Successors successors_;
933 Predecessors predecessors_; 942 Predecessors predecessors_;
934 PhiInstructions phis_; 943 PhiInstructions phis_;
935 RpoNumber ao_number_; // Assembly order number. 944 RpoNumber ao_number_; // Assembly order number.
936 const RpoNumber rpo_number_; 945 const RpoNumber rpo_number_;
937 const RpoNumber loop_header_; 946 const RpoNumber loop_header_;
938 const RpoNumber loop_end_; 947 const RpoNumber loop_end_;
939 int32_t code_start_; // start index of arch-specific code. 948 int32_t code_start_; // start index of arch-specific code.
940 int32_t code_end_; // end index of arch-specific code. 949 int32_t code_end_; // end index of arch-specific code.
941 const bool deferred_; // Block contains deferred code. 950 const bool deferred_; // Block contains deferred code.
951 bool needs_frame_;
952 bool must_construct_frame_;
953 bool must_deconstruct_frame_;
942 }; 954 };
943 955
944 typedef ZoneDeque<Constant> ConstantDeque; 956 typedef ZoneDeque<Constant> ConstantDeque;
945 typedef std::map<int, Constant, std::less<int>, 957 typedef std::map<int, Constant, std::less<int>,
946 zone_allocator<std::pair<int, Constant> > > ConstantMap; 958 zone_allocator<std::pair<int, Constant> > > ConstantMap;
947 959
948 typedef ZoneDeque<Instruction*> InstructionDeque; 960 typedef ZoneDeque<Instruction*> InstructionDeque;
949 typedef ZoneDeque<ReferenceMap*> ReferenceMapDeque; 961 typedef ZoneDeque<ReferenceMap*> ReferenceMapDeque;
950 typedef ZoneVector<FrameStateDescriptor*> DeoptimizationVector; 962 typedef ZoneVector<FrameStateDescriptor*> DeoptimizationVector;
951 typedef ZoneVector<InstructionBlock*> InstructionBlocks; 963 typedef ZoneVector<InstructionBlock*> InstructionBlocks;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 1126
1115 1127
1116 std::ostream& operator<<(std::ostream& os, 1128 std::ostream& operator<<(std::ostream& os,
1117 const PrintableInstructionSequence& code); 1129 const PrintableInstructionSequence& code);
1118 1130
1119 } // namespace compiler 1131 } // namespace compiler
1120 } // namespace internal 1132 } // namespace internal
1121 } // namespace v8 1133 } // namespace v8
1122 1134
1123 #endif // V8_COMPILER_INSTRUCTION_H_ 1135 #endif // V8_COMPILER_INSTRUCTION_H_
OLDNEW
« no previous file with comments | « src/compiler/frame-elider.cc ('k') | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698