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

Unified Diff: src/ast/ast.cc

Issue 1742013002: [cleanup] Move ForEach vector feedback slots to ForInStatement (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/ast/ast.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.cc
diff --git a/src/ast/ast.cc b/src/ast/ast.cc
index 003e44e28487980436db3ed1a6d26fa2d4d60ecc..052c83ca85fb81df417a36944f51bf4e4658d100 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -148,15 +148,11 @@ static void AssignVectorSlots(Expression* expr, FeedbackVectorSpec* spec,
}
}
-
-void ForEachStatement::AssignFeedbackVectorSlots(
- Isolate* isolate, FeedbackVectorSpec* spec,
- FeedbackVectorSlotCache* cache) {
- // TODO(adamk): for-of statements do not make use of this feedback slot.
- // The each_slot_ should be specific to ForInStatement, and this work moved
- // there.
- if (IsForOfStatement()) return;
+void ForInStatement::AssignFeedbackVectorSlots(Isolate* isolate,
+ FeedbackVectorSpec* spec,
+ FeedbackVectorSlotCache* cache) {
AssignVectorSlots(each(), spec, &each_slot_);
+ for_in_feedback_slot_ = spec->AddGeneralSlot();
}
« no previous file with comments | « src/ast/ast.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698