Changeset 272883 in webkit for trunk/Source/JavaScriptCore/parser/Nodes.h
- Timestamp:
- Feb 15, 2021, 2:40:26 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/Nodes.h
r272580 r272883 722 722 class PropertyNode final : public ParserArenaFreeable { 723 723 public: 724 enum Type : uint 8_t { Constant = 1, Getter = 2, Setter = 4, Computed = 8, Shorthand = 16, Spread = 32, PrivateField = 64, PrivateMethod = 128};724 enum Type : uint16_t { Constant = 1, Getter = 2, Setter = 4, Computed = 8, Shorthand = 16, Spread = 32, PrivateField = 64, PrivateMethod = 128, PrivateSetter = 256, PrivateGetter = 512 }; 725 725 726 726 PropertyNode(const Identifier&, ExpressionNode*, Type, SuperBinding, ClassElementTag); … … 741 741 bool isStaticClassField() const { return isStaticClassProperty() && !needsSuperBinding(); } 742 742 bool isOverriddenByDuplicate() const { return m_isOverriddenByDuplicate; } 743 bool isPrivate() const { return m_type & (PrivateField | PrivateMethod ); }743 bool isPrivate() const { return m_type & (PrivateField | PrivateMethod | PrivateGetter | PrivateSetter); } 744 744 bool hasComputedName() const { return m_expression; } 745 745 bool isComputedClassField() const { return isClassField() && hasComputedName(); } … … 761 761 ExpressionNode* m_expression; 762 762 ExpressionNode* m_assign; 763 unsigned m_type ;763 unsigned m_type : 10; 764 764 unsigned m_needsSuperBinding : 1; 765 765 static_assert(1 << 2 > static_cast<unsigned>(ClassElementTag::LastTag), "ClassElementTag shouldn't use more than two bits"); … … 789 789 } 790 790 791 void setHasPrivateAccessors(bool hasPrivateAccessors) 792 { 793 m_hasPrivateAccessors = hasPrivateAccessors; 794 } 795 796 bool hasPrivateAccessors() const 797 { 798 return m_hasPrivateAccessors; 799 } 800 791 801 static bool shouldCreateLexicalScopeForClass(PropertyListNode*); 792 802 … … 805 815 PropertyNode* m_node; 806 816 PropertyListNode* m_next { nullptr }; 817 bool m_hasPrivateAccessors { false }; 807 818 }; 808 819
Note:
See TracChangeset
for help on using the changeset viewer.