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 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1614 Isolate* isolate, const ICSlotCache* cache) override; | 1614 Isolate* isolate, const ICSlotCache* cache) override; |
1615 | 1615 |
1616 void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot, | 1616 void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot, |
1617 ICSlotCache* cache) override; | 1617 ICSlotCache* cache) override; |
1618 Code::Kind FeedbackICSlotKind(int index) override { return Code::LOAD_IC; } | 1618 Code::Kind FeedbackICSlotKind(int index) override { return Code::LOAD_IC; } |
1619 FeedbackVectorICSlot VariableFeedbackSlot() { | 1619 FeedbackVectorICSlot VariableFeedbackSlot() { |
1620 DCHECK(!UsesVariableFeedbackSlot() || !variable_feedback_slot_.IsInvalid()); | 1620 DCHECK(!UsesVariableFeedbackSlot() || !variable_feedback_slot_.IsInvalid()); |
1621 return variable_feedback_slot_; | 1621 return variable_feedback_slot_; |
1622 } | 1622 } |
1623 | 1623 |
| 1624 static int num_ids() { return parent_num_ids() + 1; } |
| 1625 BailoutId BeforeId() const { return BailoutId(local_id(0)); } |
| 1626 |
1624 protected: | 1627 protected: |
1625 VariableProxy(Zone* zone, Variable* var, int start_position, | 1628 VariableProxy(Zone* zone, Variable* var, int start_position, |
1626 int end_position); | 1629 int end_position); |
1627 | 1630 |
1628 VariableProxy(Zone* zone, const AstRawString* name, | 1631 VariableProxy(Zone* zone, const AstRawString* name, |
1629 Variable::Kind variable_kind, int start_position, | 1632 Variable::Kind variable_kind, int start_position, |
1630 int end_position); | 1633 int end_position); |
| 1634 static int parent_num_ids() { return Expression::num_ids(); } |
| 1635 int local_id(int n) const { return base_id() + parent_num_ids() + n; } |
1631 | 1636 |
1632 class IsThisField : public BitField8<bool, 0, 1> {}; | 1637 class IsThisField : public BitField8<bool, 0, 1> {}; |
1633 class IsAssignedField : public BitField8<bool, 1, 1> {}; | 1638 class IsAssignedField : public BitField8<bool, 1, 1> {}; |
1634 class IsResolvedField : public BitField8<bool, 2, 1> {}; | 1639 class IsResolvedField : public BitField8<bool, 2, 1> {}; |
1635 | 1640 |
1636 // Start with 16-bit (or smaller) field, which should get packed together | 1641 // Start with 16-bit (or smaller) field, which should get packed together |
1637 // with Expression's trailing 16-bit field. | 1642 // with Expression's trailing 16-bit field. |
1638 uint8_t bit_field_; | 1643 uint8_t bit_field_; |
1639 FeedbackVectorICSlot variable_feedback_slot_; | 1644 FeedbackVectorICSlot variable_feedback_slot_; |
1640 union { | 1645 union { |
(...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3497 | 3502 |
3498 private: | 3503 private: |
3499 Zone* zone_; | 3504 Zone* zone_; |
3500 AstValueFactory* ast_value_factory_; | 3505 AstValueFactory* ast_value_factory_; |
3501 }; | 3506 }; |
3502 | 3507 |
3503 | 3508 |
3504 } } // namespace v8::internal | 3509 } } // namespace v8::internal |
3505 | 3510 |
3506 #endif // V8_AST_H_ | 3511 #endif // V8_AST_H_ |
OLD | NEW |