| 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/ast/ast-value-factory.h" | 8 #include "src/ast/ast-value-factory.h" |
| 9 #include "src/ast/modules.h" | 9 #include "src/ast/modules.h" |
| 10 #include "src/ast/variables.h" | 10 #include "src/ast/variables.h" |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 FeedbackVectorSlot EachFeedbackSlot() const { return each_slot_; } | 711 FeedbackVectorSlot EachFeedbackSlot() const { return each_slot_; } |
| 712 FeedbackVectorSlot ForInFeedbackSlot() { | 712 FeedbackVectorSlot ForInFeedbackSlot() { |
| 713 DCHECK(!for_in_feedback_slot_.IsInvalid()); | 713 DCHECK(!for_in_feedback_slot_.IsInvalid()); |
| 714 return for_in_feedback_slot_; | 714 return for_in_feedback_slot_; |
| 715 } | 715 } |
| 716 | 716 |
| 717 enum ForInType { FAST_FOR_IN, SLOW_FOR_IN }; | 717 enum ForInType { FAST_FOR_IN, SLOW_FOR_IN }; |
| 718 ForInType for_in_type() const { return for_in_type_; } | 718 ForInType for_in_type() const { return for_in_type_; } |
| 719 void set_for_in_type(ForInType type) { for_in_type_ = type; } | 719 void set_for_in_type(ForInType type) { for_in_type_ = type; } |
| 720 | 720 |
| 721 static int num_ids() { return parent_num_ids() + 6; } | 721 static int num_ids() { return parent_num_ids() + 7; } |
| 722 BailoutId BodyId() const { return BailoutId(local_id(0)); } | 722 BailoutId BodyId() const { return BailoutId(local_id(0)); } |
| 723 BailoutId EnumId() const { return BailoutId(local_id(1)); } | 723 BailoutId EnumId() const { return BailoutId(local_id(1)); } |
| 724 BailoutId ToObjectId() const { return BailoutId(local_id(2)); } | 724 BailoutId ToObjectId() const { return BailoutId(local_id(2)); } |
| 725 BailoutId PrepareId() const { return BailoutId(local_id(3)); } | 725 BailoutId PrepareId() const { return BailoutId(local_id(3)); } |
| 726 BailoutId FilterId() const { return BailoutId(local_id(4)); } | 726 BailoutId FilterId() const { return BailoutId(local_id(4)); } |
| 727 BailoutId AssignmentId() const { return BailoutId(local_id(5)); } | 727 BailoutId AssignmentId() const { return BailoutId(local_id(5)); } |
| 728 BailoutId IncrementId() const { return BailoutId(local_id(6)); } |
| 728 BailoutId ContinueId() const { return EntryId(); } | 729 BailoutId ContinueId() const { return EntryId(); } |
| 729 BailoutId StackCheckId() const { return BodyId(); } | 730 BailoutId StackCheckId() const { return BodyId(); } |
| 730 | 731 |
| 731 private: | 732 private: |
| 732 friend class AstNodeFactory; | 733 friend class AstNodeFactory; |
| 733 | 734 |
| 734 ForInStatement(ZoneList<const AstRawString*>* labels, int pos) | 735 ForInStatement(ZoneList<const AstRawString*>* labels, int pos) |
| 735 : ForEachStatement(labels, pos, kForInStatement), | 736 : ForEachStatement(labels, pos, kForInStatement), |
| 736 each_(nullptr), | 737 each_(nullptr), |
| 737 subject_(nullptr), | 738 subject_(nullptr), |
| (...skipping 2712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3450 : NULL; \ | 3451 : NULL; \ |
| 3451 } | 3452 } |
| 3452 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) | 3453 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) |
| 3453 #undef DECLARE_NODE_FUNCTIONS | 3454 #undef DECLARE_NODE_FUNCTIONS |
| 3454 | 3455 |
| 3455 | 3456 |
| 3456 } // namespace internal | 3457 } // namespace internal |
| 3457 } // namespace v8 | 3458 } // namespace v8 |
| 3458 | 3459 |
| 3459 #endif // V8_AST_AST_H_ | 3460 #endif // V8_AST_AST_H_ |
| OLD | NEW |