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

Unified Diff: src/ast.h

Issue 754303003: Flesh out vector ic state query and set mechanisms. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Patch one. Created 6 years, 1 month 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 | « no previous file | src/ast-numbering.cc » ('j') | src/ic/ia32/ic-ia32.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 25cfdf59b3b50b3d907970d1316254e8f1ac4fa7..9d876b8474e969cfc418019dc43863e36f078260 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1698,16 +1698,21 @@ class VariableProxy FINAL : public Expression {
// Bind this proxy to the variable var. Interfaces must match.
void BindTo(Variable* var);
+ bool UsesVariableFeedbackSlot() const {
+ return FLAG_vector_ics && (var()->IsUnallocated() || var()->IsLookupSlot());
+ }
+
virtual FeedbackVectorRequirements ComputeFeedbackRequirements(
Isolate* isolate) OVERRIDE {
- return FeedbackVectorRequirements(0, FLAG_vector_ics ? 1 : 0);
+ return FeedbackVectorRequirements(0, UsesVariableFeedbackSlot() ? 1 : 0);
}
+
virtual void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
variable_feedback_slot_ = slot;
}
FeedbackVectorICSlot VariableFeedbackSlot() {
- DCHECK(!FLAG_vector_ics || !variable_feedback_slot_.IsInvalid());
+ DCHECK(!UsesVariableFeedbackSlot() || !variable_feedback_slot_.IsInvalid());
return variable_feedback_slot_;
}
@@ -2009,17 +2014,19 @@ class CallRuntime FINAL : public Expression {
bool is_jsruntime() const { return function_ == NULL; }
// Type feedback information.
+ bool HasCallRuntimeFeedbackSlot() const {
+ return FLAG_vector_ics && is_jsruntime();
+ }
virtual FeedbackVectorRequirements ComputeFeedbackRequirements(
Isolate* isolate) OVERRIDE {
- return FeedbackVectorRequirements(
- 0, (FLAG_vector_ics && is_jsruntime()) ? 1 : 0);
+ return FeedbackVectorRequirements(0, HasCallRuntimeFeedbackSlot() ? 1 : 0);
}
virtual void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
callruntime_feedback_slot_ = slot;
}
FeedbackVectorICSlot CallRuntimeFeedbackSlot() {
- DCHECK(!(FLAG_vector_ics && is_jsruntime()) ||
+ DCHECK(!HasCallRuntimeFeedbackSlot() ||
!callruntime_feedback_slot_.IsInvalid());
return callruntime_feedback_slot_;
}
@@ -2389,17 +2396,19 @@ class Yield FINAL : public Expression {
}
// Type feedback information.
+ bool HasFeedbackSlots() const {
+ return FLAG_vector_ics && (yield_kind() == kDelegating);
+ }
virtual FeedbackVectorRequirements ComputeFeedbackRequirements(
Isolate* isolate) OVERRIDE {
- return FeedbackVectorRequirements(
- 0, (FLAG_vector_ics && yield_kind() == kDelegating) ? 3 : 0);
+ return FeedbackVectorRequirements(0, HasFeedbackSlots() ? 3 : 0);
}
virtual void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
yield_first_feedback_slot_ = slot;
}
FeedbackVectorICSlot KeyedLoadFeedbackSlot() {
- DCHECK(!FLAG_vector_ics || !yield_first_feedback_slot_.IsInvalid());
+ DCHECK(!HasFeedbackSlots() || !yield_first_feedback_slot_.IsInvalid());
return yield_first_feedback_slot_;
}
« no previous file with comments | « no previous file | src/ast-numbering.cc » ('j') | src/ic/ia32/ic-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698