| 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_H_ | 5 #ifndef V8_AST_H_ |
| 6 #define V8_AST_H_ | 6 #define V8_AST_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 | 926 |
| 927 FeedbackVectorSlot ForInFeedbackSlot() { | 927 FeedbackVectorSlot ForInFeedbackSlot() { |
| 928 DCHECK(!for_in_feedback_slot_.IsInvalid()); | 928 DCHECK(!for_in_feedback_slot_.IsInvalid()); |
| 929 return for_in_feedback_slot_; | 929 return for_in_feedback_slot_; |
| 930 } | 930 } |
| 931 | 931 |
| 932 enum ForInType { FAST_FOR_IN, SLOW_FOR_IN }; | 932 enum ForInType { FAST_FOR_IN, SLOW_FOR_IN }; |
| 933 ForInType for_in_type() const { return for_in_type_; } | 933 ForInType for_in_type() const { return for_in_type_; } |
| 934 void set_for_in_type(ForInType type) { for_in_type_ = type; } | 934 void set_for_in_type(ForInType type) { for_in_type_ = type; } |
| 935 | 935 |
| 936 static int num_ids() { return parent_num_ids() + 4; } | 936 static int num_ids() { return parent_num_ids() + 5; } |
| 937 BailoutId BodyId() const { return BailoutId(local_id(0)); } | 937 BailoutId BodyId() const { return BailoutId(local_id(0)); } |
| 938 BailoutId PrepareId() const { return BailoutId(local_id(1)); } | 938 BailoutId PrepareId() const { return BailoutId(local_id(1)); } |
| 939 BailoutId EnumId() const { return BailoutId(local_id(2)); } | 939 BailoutId EnumId() const { return BailoutId(local_id(2)); } |
| 940 BailoutId ToObjectId() const { return BailoutId(local_id(3)); } | 940 BailoutId ToObjectId() const { return BailoutId(local_id(3)); } |
| 941 BailoutId AssignmentId() const { return BailoutId(local_id(4)); } |
| 941 BailoutId ContinueId() const OVERRIDE { return EntryId(); } | 942 BailoutId ContinueId() const OVERRIDE { return EntryId(); } |
| 942 BailoutId StackCheckId() const OVERRIDE { return BodyId(); } | 943 BailoutId StackCheckId() const OVERRIDE { return BodyId(); } |
| 943 | 944 |
| 944 protected: | 945 protected: |
| 945 ForInStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos) | 946 ForInStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos) |
| 946 : ForEachStatement(zone, labels, pos), | 947 : ForEachStatement(zone, labels, pos), |
| 947 for_in_type_(SLOW_FOR_IN), | 948 for_in_type_(SLOW_FOR_IN), |
| 948 for_in_feedback_slot_(FeedbackVectorSlot::Invalid()) {} | 949 for_in_feedback_slot_(FeedbackVectorSlot::Invalid()) {} |
| 949 static int parent_num_ids() { return ForEachStatement::num_ids(); } | 950 static int parent_num_ids() { return ForEachStatement::num_ids(); } |
| 950 | 951 |
| (...skipping 2597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3548 | 3549 |
| 3549 private: | 3550 private: |
| 3550 Zone* zone_; | 3551 Zone* zone_; |
| 3551 AstValueFactory* ast_value_factory_; | 3552 AstValueFactory* ast_value_factory_; |
| 3552 }; | 3553 }; |
| 3553 | 3554 |
| 3554 | 3555 |
| 3555 } } // namespace v8::internal | 3556 } } // namespace v8::internal |
| 3556 | 3557 |
| 3557 #endif // V8_AST_H_ | 3558 #endif // V8_AST_H_ |
| OLD | NEW |