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

Unified Diff: src/ast/ast.h

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 | « no previous file | src/ast/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index a50eee99ee0b9d2f4f272ab619a1821030bd0a14..5fdffa506ce9f602d82779c6c3674942cc3fff9c 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -790,10 +790,6 @@ class ForEachStatement : public IterationStatement {
void set_each(Expression* e) { each_ = e; }
void set_subject(Expression* e) { subject_ = e; }
- void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec,
- FeedbackVectorSlotCache* cache) override;
- FeedbackVectorSlot EachFeedbackSlot() const { return each_slot_; }
-
static const char* VisitModeString(VisitMode mode) {
return mode == ITERATE ? "for-of" : "for-in";
}
@@ -805,7 +801,6 @@ class ForEachStatement : public IterationStatement {
private:
Expression* each_;
Expression* subject_;
- FeedbackVectorSlot each_slot_;
};
@@ -819,11 +814,8 @@ class ForInStatement final : public ForEachStatement {
// Type feedback information.
void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec,
- FeedbackVectorSlotCache* cache) override {
- ForEachStatement::AssignFeedbackVectorSlots(isolate, spec, cache);
- for_in_feedback_slot_ = spec->AddGeneralSlot();
- }
-
+ FeedbackVectorSlotCache* cache) override;
+ FeedbackVectorSlot EachFeedbackSlot() const { return each_slot_; }
FeedbackVectorSlot ForInFeedbackSlot() {
DCHECK(!for_in_feedback_slot_.IsInvalid());
return for_in_feedback_slot_;
@@ -852,6 +844,7 @@ class ForInStatement final : public ForEachStatement {
int local_id(int n) const { return base_id() + parent_num_ids() + n; }
ForInType for_in_type_;
+ FeedbackVectorSlot each_slot_;
FeedbackVectorSlot for_in_feedback_slot_;
};
« no previous file with comments | « no previous file | src/ast/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698