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

Side by Side Diff: src/ast/ast.h

Issue 1663773003: Remove redundant/unnecessary variables and checks in ParseForStatement (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 unified diff | Download patch
« no previous file with comments | « no previous file | src/messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_AST_AST_H_ 5 #ifndef V8_AST_AST_H_
6 #define V8_AST_AST_H_ 6 #define V8_AST_AST_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/ast/ast-value-factory.h" 9 #include "src/ast/ast-value-factory.h"
10 #include "src/ast/modules.h" 10 #include "src/ast/modules.h"
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 Expression* each() const { return each_; } 824 Expression* each() const { return each_; }
825 Expression* subject() const { return subject_; } 825 Expression* subject() const { return subject_; }
826 826
827 void set_each(Expression* e) { each_ = e; } 827 void set_each(Expression* e) { each_ = e; }
828 void set_subject(Expression* e) { subject_ = e; } 828 void set_subject(Expression* e) { subject_ = e; }
829 829
830 void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec, 830 void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec,
831 FeedbackVectorSlotCache* cache) override; 831 FeedbackVectorSlotCache* cache) override;
832 FeedbackVectorSlot EachFeedbackSlot() const { return each_slot_; } 832 FeedbackVectorSlot EachFeedbackSlot() const { return each_slot_; }
833 833
834 static const char* VisitModeString(VisitMode mode) {
835 return mode == ITERATE ? "for-of" : "for-in";
836 }
837
834 protected: 838 protected:
835 ForEachStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos) 839 ForEachStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos)
836 : IterationStatement(zone, labels, pos), each_(NULL), subject_(NULL) {} 840 : IterationStatement(zone, labels, pos), each_(NULL), subject_(NULL) {}
837 841
838 private: 842 private:
839 Expression* each_; 843 Expression* each_;
840 Expression* subject_; 844 Expression* subject_;
841 FeedbackVectorSlot each_slot_; 845 FeedbackVectorSlot each_slot_;
842 }; 846 };
843 847
(...skipping 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after
3561 // the parser-level zone. 3565 // the parser-level zone.
3562 Zone* parser_zone_; 3566 Zone* parser_zone_;
3563 AstValueFactory* ast_value_factory_; 3567 AstValueFactory* ast_value_factory_;
3564 }; 3568 };
3565 3569
3566 3570
3567 } // namespace internal 3571 } // namespace internal
3568 } // namespace v8 3572 } // namespace v8
3569 3573
3570 #endif // V8_AST_AST_H_ 3574 #endif // V8_AST_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698