| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |