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

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

Issue 2683203002: Revert of [compiler] Pass deoptimization_kind through DeoptimizeParameters and FlagsContinuation (Closed)
Patch Set: Created 3 years, 10 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/ia32/instruction-selector-ia32.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 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 StateValueList values_; 1289 StateValueList values_;
1290 MaybeHandle<SharedFunctionInfo> const shared_info_; 1290 MaybeHandle<SharedFunctionInfo> const shared_info_;
1291 FrameStateDescriptor* outer_state_; 1291 FrameStateDescriptor* outer_state_;
1292 }; 1292 };
1293 1293
1294 // A deoptimization entry is a pair of the reason why we deoptimize and the 1294 // A deoptimization entry is a pair of the reason why we deoptimize and the
1295 // frame state descriptor that we have to go back to. 1295 // frame state descriptor that we have to go back to.
1296 class DeoptimizationEntry final { 1296 class DeoptimizationEntry final {
1297 public: 1297 public:
1298 DeoptimizationEntry() {} 1298 DeoptimizationEntry() {}
1299 DeoptimizationEntry(FrameStateDescriptor* descriptor, DeoptimizeKind kind, 1299 DeoptimizationEntry(FrameStateDescriptor* descriptor, DeoptimizeReason reason)
1300 DeoptimizeReason reason) 1300 : descriptor_(descriptor), reason_(reason) {}
1301 : descriptor_(descriptor), kind_(kind), reason_(reason) {}
1302 1301
1303 FrameStateDescriptor* descriptor() const { return descriptor_; } 1302 FrameStateDescriptor* descriptor() const { return descriptor_; }
1304 DeoptimizeKind kind() const { return kind_; }
1305 DeoptimizeReason reason() const { return reason_; } 1303 DeoptimizeReason reason() const { return reason_; }
1306 1304
1307 private: 1305 private:
1308 FrameStateDescriptor* descriptor_ = nullptr; 1306 FrameStateDescriptor* descriptor_ = nullptr;
1309 DeoptimizeKind kind_ = DeoptimizeKind::kEager;
1310 DeoptimizeReason reason_ = DeoptimizeReason::kNoReason; 1307 DeoptimizeReason reason_ = DeoptimizeReason::kNoReason;
1311 }; 1308 };
1312 1309
1313 typedef ZoneVector<DeoptimizationEntry> DeoptimizationVector; 1310 typedef ZoneVector<DeoptimizationEntry> DeoptimizationVector;
1314 1311
1315 class V8_EXPORT_PRIVATE PhiInstruction final 1312 class V8_EXPORT_PRIVATE PhiInstruction final
1316 : public NON_EXPORTED_BASE(ZoneObject) { 1313 : public NON_EXPORTED_BASE(ZoneObject) {
1317 public: 1314 public:
1318 typedef ZoneVector<InstructionOperand> Inputs; 1315 typedef ZoneVector<InstructionOperand> Inputs;
1319 1316
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 DCHECK(index >= 0); 1556 DCHECK(index >= 0);
1560 DCHECK(index < static_cast<int>(immediates_.size())); 1557 DCHECK(index < static_cast<int>(immediates_.size()));
1561 return immediates_[index]; 1558 return immediates_[index];
1562 } 1559 }
1563 } 1560 }
1564 UNREACHABLE(); 1561 UNREACHABLE();
1565 return Constant(static_cast<int32_t>(0)); 1562 return Constant(static_cast<int32_t>(0));
1566 } 1563 }
1567 1564
1568 int AddDeoptimizationEntry(FrameStateDescriptor* descriptor, 1565 int AddDeoptimizationEntry(FrameStateDescriptor* descriptor,
1569 DeoptimizeKind kind, DeoptimizeReason reason); 1566 DeoptimizeReason reason);
1570 DeoptimizationEntry const& GetDeoptimizationEntry(int deoptimization_id); 1567 DeoptimizationEntry const& GetDeoptimizationEntry(int deoptimization_id);
1571 int GetDeoptimizationEntryCount() const { 1568 int GetDeoptimizationEntryCount() const {
1572 return static_cast<int>(deoptimization_entries_.size()); 1569 return static_cast<int>(deoptimization_entries_.size());
1573 } 1570 }
1574 1571
1575 RpoNumber InputRpo(Instruction* instr, size_t index); 1572 RpoNumber InputRpo(Instruction* instr, size_t index);
1576 1573
1577 bool GetSourcePosition(const Instruction* instr, 1574 bool GetSourcePosition(const Instruction* instr,
1578 SourcePosition* result) const; 1575 SourcePosition* result) const;
1579 void SetSourcePosition(const Instruction* instr, SourcePosition value); 1576 void SetSourcePosition(const Instruction* instr, SourcePosition value);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1636 }; 1633 };
1637 1634
1638 V8_EXPORT_PRIVATE std::ostream& operator<<( 1635 V8_EXPORT_PRIVATE std::ostream& operator<<(
1639 std::ostream& os, const PrintableInstructionSequence& code); 1636 std::ostream& os, const PrintableInstructionSequence& code);
1640 1637
1641 } // namespace compiler 1638 } // namespace compiler
1642 } // namespace internal 1639 } // namespace internal
1643 } // namespace v8 1640 } // namespace v8
1644 1641
1645 #endif // V8_COMPILER_INSTRUCTION_H_ 1642 #endif // V8_COMPILER_INSTRUCTION_H_
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698