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

Unified Diff: src/compiler/code-generator.h

Issue 2161543002: [turbofan] Add support for eager/soft deoptimization reasons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Do the ports properly Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/branch-elimination.cc ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator.h
diff --git a/src/compiler/code-generator.h b/src/compiler/code-generator.h
index 459499cf607267761236d9704eaa5efa675dfb57..feb9419e7cd4c550d652ea4893e16d193db0b2c7 100644
--- a/src/compiler/code-generator.h
+++ b/src/compiler/code-generator.h
@@ -202,8 +202,9 @@ class CodeGenerator final : public GapResolver::Assembler {
void RecordCallPosition(Instruction* instr);
void PopulateDeoptimizationData(Handle<Code> code);
int DefineDeoptimizationLiteral(Handle<Object> literal);
- FrameStateDescriptor* GetFrameStateDescriptor(Instruction* instr,
- size_t frame_state_offset);
+ DeoptimizationEntry const& GetDeoptimizationEntry(Instruction* instr,
+ size_t frame_state_offset);
+ DeoptimizeReason GetDeoptimizationReason(int deoptimization_id) const;
int BuildTranslation(Instruction* instr, int pc_offset,
size_t frame_state_offset,
OutputFrameStateCombine state_combine);
@@ -227,21 +228,25 @@ class CodeGenerator final : public GapResolver::Assembler {
// ===========================================================================
- struct DeoptimizationState : ZoneObject {
+ class DeoptimizationState final : public ZoneObject {
public:
+ DeoptimizationState(BailoutId bailout_id, int translation_id, int pc_offset,
+ DeoptimizeReason reason)
+ : bailout_id_(bailout_id),
+ translation_id_(translation_id),
+ pc_offset_(pc_offset),
+ reason_(reason) {}
+
BailoutId bailout_id() const { return bailout_id_; }
int translation_id() const { return translation_id_; }
int pc_offset() const { return pc_offset_; }
-
- DeoptimizationState(BailoutId bailout_id, int translation_id, int pc_offset)
- : bailout_id_(bailout_id),
- translation_id_(translation_id),
- pc_offset_(pc_offset) {}
+ DeoptimizeReason reason() const { return reason_; }
private:
BailoutId bailout_id_;
int translation_id_;
int pc_offset_;
+ DeoptimizeReason reason_;
};
struct HandlerInfo {
« no previous file with comments | « src/compiler/branch-elimination.cc ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698