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

Unified Diff: src/compiler/instruction-selector-impl.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/instruction-selector.cc ('k') | src/compiler/js-intrinsic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/js-intrinsic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698