OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1639 DECLARE_NODE_TYPE(Property) | 1639 DECLARE_NODE_TYPE(Property) |
1640 | 1640 |
1641 virtual bool IsValidLeftHandSide() V8_OVERRIDE { return true; } | 1641 virtual bool IsValidLeftHandSide() V8_OVERRIDE { return true; } |
1642 | 1642 |
1643 Expression* obj() const { return obj_; } | 1643 Expression* obj() const { return obj_; } |
1644 Expression* key() const { return key_; } | 1644 Expression* key() const { return key_; } |
1645 virtual int position() const V8_OVERRIDE { return pos_; } | 1645 virtual int position() const V8_OVERRIDE { return pos_; } |
1646 | 1646 |
1647 BailoutId LoadId() const { return load_id_; } | 1647 BailoutId LoadId() const { return load_id_; } |
1648 | 1648 |
1649 bool IsStringLength() const { return is_string_length_; } | |
1650 bool IsStringAccess() const { return is_string_access_; } | 1649 bool IsStringAccess() const { return is_string_access_; } |
1651 bool IsFunctionPrototype() const { return is_function_prototype_; } | 1650 bool IsFunctionPrototype() const { return is_function_prototype_; } |
1652 | 1651 |
1653 // Type feedback information. | 1652 // Type feedback information. |
1654 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); | 1653 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); |
1655 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } | 1654 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } |
1656 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { | 1655 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { |
1657 return &receiver_types_; | 1656 return &receiver_types_; |
1658 } | 1657 } |
1659 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { | 1658 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { |
1660 return STANDARD_STORE; | 1659 return STANDARD_STORE; |
1661 } | 1660 } |
1662 bool IsUninitialized() { return is_uninitialized_; } | 1661 bool IsUninitialized() { return is_uninitialized_; } |
1663 TypeFeedbackId PropertyFeedbackId() { return reuse(id()); } | 1662 TypeFeedbackId PropertyFeedbackId() { return reuse(id()); } |
1664 | 1663 |
1665 protected: | 1664 protected: |
1666 Property(Isolate* isolate, | 1665 Property(Isolate* isolate, |
1667 Expression* obj, | 1666 Expression* obj, |
1668 Expression* key, | 1667 Expression* key, |
1669 int pos) | 1668 int pos) |
1670 : Expression(isolate), | 1669 : Expression(isolate), |
1671 obj_(obj), | 1670 obj_(obj), |
1672 key_(key), | 1671 key_(key), |
1673 pos_(pos), | 1672 pos_(pos), |
1674 load_id_(GetNextId(isolate)), | 1673 load_id_(GetNextId(isolate)), |
1675 is_monomorphic_(false), | 1674 is_monomorphic_(false), |
1676 is_uninitialized_(false), | 1675 is_uninitialized_(false), |
1677 is_string_length_(false), | |
1678 is_string_access_(false), | 1676 is_string_access_(false), |
1679 is_function_prototype_(false) { } | 1677 is_function_prototype_(false) { } |
1680 | 1678 |
1681 private: | 1679 private: |
1682 Expression* obj_; | 1680 Expression* obj_; |
1683 Expression* key_; | 1681 Expression* key_; |
1684 int pos_; | 1682 int pos_; |
1685 const BailoutId load_id_; | 1683 const BailoutId load_id_; |
1686 | 1684 |
1687 SmallMapList receiver_types_; | 1685 SmallMapList receiver_types_; |
1688 bool is_monomorphic_ : 1; | 1686 bool is_monomorphic_ : 1; |
1689 bool is_uninitialized_ : 1; | 1687 bool is_uninitialized_ : 1; |
1690 bool is_string_length_ : 1; | |
1691 bool is_string_access_ : 1; | 1688 bool is_string_access_ : 1; |
1692 bool is_function_prototype_ : 1; | 1689 bool is_function_prototype_ : 1; |
1693 }; | 1690 }; |
1694 | 1691 |
1695 | 1692 |
1696 class Call V8_FINAL : public Expression { | 1693 class Call V8_FINAL : public Expression { |
1697 public: | 1694 public: |
1698 DECLARE_NODE_TYPE(Call) | 1695 DECLARE_NODE_TYPE(Call) |
1699 | 1696 |
1700 Expression* expression() const { return expression_; } | 1697 Expression* expression() const { return expression_; } |
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3257 private: | 3254 private: |
3258 Isolate* isolate_; | 3255 Isolate* isolate_; |
3259 Zone* zone_; | 3256 Zone* zone_; |
3260 Visitor visitor_; | 3257 Visitor visitor_; |
3261 }; | 3258 }; |
3262 | 3259 |
3263 | 3260 |
3264 } } // namespace v8::internal | 3261 } } // namespace v8::internal |
3265 | 3262 |
3266 #endif // V8_AST_H_ | 3263 #endif // V8_AST_H_ |
OLD | NEW |