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

Unified Diff: src/compiler/instruction.h

Issue 2729163002: [turbofan] compute arguments length in deoptimizer (Closed)
Patch Set: fix comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/escape-analysis-reducer.cc ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index 1299995891ee6331c2c359f3c4a38858ee25ee9b..78496c0226f065123e855c678c4626f8d795bc4a 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -1126,6 +1126,7 @@ class FrameStateDescriptor;
enum class StateValueKind : uint8_t {
kArgumentsElements,
+ kArgumentsLength,
kPlain,
kOptimizedOut,
kNested,
@@ -1143,6 +1144,12 @@ class StateValueDescriptor {
descr.is_rest_ = is_rest;
return descr;
}
+ static StateValueDescriptor ArgumentsLength(bool is_rest) {
+ StateValueDescriptor descr(StateValueKind::kArgumentsLength,
+ MachineType::AnyTagged());
+ descr.is_rest_ = is_rest;
+ return descr;
+ }
static StateValueDescriptor Plain(MachineType type) {
return StateValueDescriptor(StateValueKind::kPlain, type);
}
@@ -1166,6 +1173,9 @@ class StateValueDescriptor {
bool IsArgumentsElements() const {
return kind_ == StateValueKind::kArgumentsElements;
}
+ bool IsArgumentsLength() const {
+ return kind_ == StateValueKind::kArgumentsLength;
+ }
bool IsPlain() const { return kind_ == StateValueKind::kPlain; }
bool IsOptimizedOut() const { return kind_ == StateValueKind::kOptimizedOut; }
bool IsNested() const { return kind_ == StateValueKind::kNested; }
@@ -1177,7 +1187,8 @@ class StateValueDescriptor {
return id_;
}
int is_rest() const {
- DCHECK(kind_ == StateValueKind::kArgumentsElements);
+ DCHECK(kind_ == StateValueKind::kArgumentsElements ||
+ kind_ == StateValueKind::kArgumentsLength);
return is_rest_;
}
@@ -1252,6 +1263,9 @@ class StateValueList {
void PushArgumentsElements(bool is_rest) {
fields_.push_back(StateValueDescriptor::ArgumentsElements(is_rest));
}
+ void PushArgumentsLength(bool is_rest) {
+ fields_.push_back(StateValueDescriptor::ArgumentsLength(is_rest));
+ }
void PushDuplicate(size_t id) {
fields_.push_back(StateValueDescriptor::Duplicate(id));
}
« no previous file with comments | « src/compiler/escape-analysis-reducer.cc ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698