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

Side by Side Diff: src/hydrogen-instructions.h

Issue 961283002: CpuProfiler: do not calculate positions if it is not necessary (BuildCompareInstruction part). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/hydrogen.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 HBasicBlock* SecondSuccessor() { 1184 HBasicBlock* SecondSuccessor() {
1185 return SuccessorCount() > 1 ? SuccessorAt(1) : NULL; 1185 return SuccessorCount() > 1 ? SuccessorAt(1) : NULL;
1186 } 1186 }
1187 1187
1188 void Not() { 1188 void Not() {
1189 HBasicBlock* swap = SuccessorAt(0); 1189 HBasicBlock* swap = SuccessorAt(0);
1190 SetSuccessorAt(0, SuccessorAt(1)); 1190 SetSuccessorAt(0, SuccessorAt(1));
1191 SetSuccessorAt(1, swap); 1191 SetSuccessorAt(1, swap);
1192 } 1192 }
1193 1193
1194 void SetOperandPositions(Zone* zone, SourcePosition left_pos,
Vyacheslav Egorov (Google) 2015/02/27 13:50:15 This feels really out of place here, because not a
1195 SourcePosition right_pos) {
1196 set_operand_position(zone, 0, left_pos);
1197 set_operand_position(zone, 1, right_pos);
1198 }
1199
1200
1194 DECLARE_ABSTRACT_INSTRUCTION(ControlInstruction) 1201 DECLARE_ABSTRACT_INSTRUCTION(ControlInstruction)
1195 }; 1202 };
1196 1203
1197 1204
1198 class HSuccessorIterator FINAL BASE_EMBEDDED { 1205 class HSuccessorIterator FINAL BASE_EMBEDDED {
1199 public: 1206 public:
1200 explicit HSuccessorIterator(const HControlInstruction* instr) 1207 explicit HSuccessorIterator(const HControlInstruction* instr)
1201 : instr_(instr), current_(0) {} 1208 : instr_(instr), current_(0) {}
1202 1209
1203 bool Done() { return current_ >= instr_->SuccessorCount(); } 1210 bool Done() { return current_ >= instr_->SuccessorCount(); }
(...skipping 3055 matching lines...) Expand 10 before | Expand all | Expand 10 after
4259 return representation(); 4266 return representation();
4260 } 4267 }
4261 Representation observed_input_representation(int index) OVERRIDE { 4268 Representation observed_input_representation(int index) OVERRIDE {
4262 return observed_input_representation_[index]; 4269 return observed_input_representation_[index];
4263 } 4270 }
4264 4271
4265 bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE; 4272 bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE;
4266 4273
4267 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT 4274 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT
4268 4275
4269 void SetOperandPositions(Zone* zone, SourcePosition left_pos,
4270 SourcePosition right_pos) {
4271 set_operand_position(zone, 0, left_pos);
4272 set_operand_position(zone, 1, right_pos);
4273 }
4274
4275 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch) 4276 DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch)
4276 4277
4277 private: 4278 private:
4278 HCompareNumericAndBranch(HValue* left, 4279 HCompareNumericAndBranch(HValue* left,
4279 HValue* right, 4280 HValue* right,
4280 Token::Value token, 4281 Token::Value token,
4281 HBasicBlock* true_target = NULL, 4282 HBasicBlock* true_target = NULL,
4282 HBasicBlock* false_target = NULL) 4283 HBasicBlock* false_target = NULL)
4283 : token_(token) { 4284 : token_(token) {
4284 SetFlag(kFlexibleRepresentation); 4285 SetFlag(kFlexibleRepresentation);
(...skipping 3679 matching lines...) Expand 10 before | Expand all | Expand 10 after
7964 }; 7965 };
7965 7966
7966 7967
7967 7968
7968 #undef DECLARE_INSTRUCTION 7969 #undef DECLARE_INSTRUCTION
7969 #undef DECLARE_CONCRETE_INSTRUCTION 7970 #undef DECLARE_CONCRETE_INSTRUCTION
7970 7971
7971 } } // namespace v8::internal 7972 } } // namespace v8::internal
7972 7973
7973 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7974 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698