Index: src/compiler/instruction-selector-impl.h |
diff --git a/src/compiler/instruction-selector-impl.h b/src/compiler/instruction-selector-impl.h |
index 63a4e9e2df799a6838f5862a4e28d0d60cd55844..11d66fa16b1957256f873497134659b852859dc4 100644 |
--- a/src/compiler/instruction-selector-impl.h |
+++ b/src/compiler/instruction-selector-impl.h |
@@ -325,13 +325,14 @@ class FlagsContinuation final { |
// Creates a new flags continuation for an eager deoptimization exit. |
static FlagsContinuation ForDeoptimize(FlagsCondition condition, |
+ DeoptimizeReason reason, |
Node* frame_state) { |
- return FlagsContinuation(kFlags_deoptimize, condition, frame_state); |
+ return FlagsContinuation(condition, reason, frame_state); |
} |
// Creates a new flags continuation for a boolean value. |
static FlagsContinuation ForSet(FlagsCondition condition, Node* result) { |
- return FlagsContinuation(kFlags_set, condition, result); |
+ return FlagsContinuation(condition, result); |
} |
bool IsNone() const { return mode_ == kFlags_none; } |
@@ -342,6 +343,10 @@ class FlagsContinuation final { |
DCHECK(!IsNone()); |
return condition_; |
} |
+ DeoptimizeReason reason() const { |
+ DCHECK(IsDeoptimize()); |
+ return reason_; |
+ } |
Node* frame_state() const { |
DCHECK(IsDeoptimize()); |
return frame_state_or_result_; |
@@ -387,16 +392,24 @@ class FlagsContinuation final { |
} |
private: |
- FlagsContinuation(FlagsMode mode, FlagsCondition condition, |
- Node* frame_state_or_result) |
- : mode_(mode), |
+ FlagsContinuation(FlagsCondition condition, DeoptimizeReason reason, |
+ Node* frame_state) |
+ : mode_(kFlags_deoptimize), |
+ condition_(condition), |
+ reason_(reason), |
+ frame_state_or_result_(frame_state) { |
+ DCHECK_NOT_NULL(frame_state); |
+ } |
+ FlagsContinuation(FlagsCondition condition, Node* result) |
+ : mode_(kFlags_set), |
condition_(condition), |
- frame_state_or_result_(frame_state_or_result) { |
- DCHECK_NOT_NULL(frame_state_or_result); |
+ frame_state_or_result_(result) { |
+ DCHECK_NOT_NULL(result); |
} |
FlagsMode const mode_; |
FlagsCondition condition_; |
+ DeoptimizeReason reason_; // Only value if mode_ == kFlags_deoptimize |
Node* frame_state_or_result_; // Only valid if mode_ == kFlags_deoptimize |
// or mode_ == kFlags_set. |
BasicBlock* true_block_; // Only valid if mode_ == kFlags_branch. |