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_; } |
1649 bool IsStringAccess() const { return is_string_access_; } | 1650 bool IsStringAccess() const { return is_string_access_; } |
1650 bool IsFunctionPrototype() const { return is_function_prototype_; } | 1651 bool IsFunctionPrototype() const { return is_function_prototype_; } |
1651 | 1652 |
1652 // Type feedback information. | 1653 // Type feedback information. |
1653 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); | 1654 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); |
1654 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } | 1655 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } |
1655 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { | 1656 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { |
1656 return &receiver_types_; | 1657 return &receiver_types_; |
1657 } | 1658 } |
1658 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { | 1659 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { |
1659 return STANDARD_STORE; | 1660 return STANDARD_STORE; |
1660 } | 1661 } |
1661 bool IsUninitialized() { return is_uninitialized_; } | 1662 bool IsUninitialized() { return is_uninitialized_; } |
1662 TypeFeedbackId PropertyFeedbackId() { return reuse(id()); } | 1663 TypeFeedbackId PropertyFeedbackId() { return reuse(id()); } |
1663 | 1664 |
1664 protected: | 1665 protected: |
1665 Property(Isolate* isolate, | 1666 Property(Isolate* isolate, |
1666 Expression* obj, | 1667 Expression* obj, |
1667 Expression* key, | 1668 Expression* key, |
1668 int pos) | 1669 int pos) |
1669 : Expression(isolate), | 1670 : Expression(isolate), |
1670 obj_(obj), | 1671 obj_(obj), |
1671 key_(key), | 1672 key_(key), |
1672 pos_(pos), | 1673 pos_(pos), |
1673 load_id_(GetNextId(isolate)), | 1674 load_id_(GetNextId(isolate)), |
1674 is_monomorphic_(false), | 1675 is_monomorphic_(false), |
1675 is_uninitialized_(false), | 1676 is_uninitialized_(false), |
| 1677 is_string_length_(false), |
1676 is_string_access_(false), | 1678 is_string_access_(false), |
1677 is_function_prototype_(false) { } | 1679 is_function_prototype_(false) { } |
1678 | 1680 |
1679 private: | 1681 private: |
1680 Expression* obj_; | 1682 Expression* obj_; |
1681 Expression* key_; | 1683 Expression* key_; |
1682 int pos_; | 1684 int pos_; |
1683 const BailoutId load_id_; | 1685 const BailoutId load_id_; |
1684 | 1686 |
1685 SmallMapList receiver_types_; | 1687 SmallMapList receiver_types_; |
1686 bool is_monomorphic_ : 1; | 1688 bool is_monomorphic_ : 1; |
1687 bool is_uninitialized_ : 1; | 1689 bool is_uninitialized_ : 1; |
| 1690 bool is_string_length_ : 1; |
1688 bool is_string_access_ : 1; | 1691 bool is_string_access_ : 1; |
1689 bool is_function_prototype_ : 1; | 1692 bool is_function_prototype_ : 1; |
1690 }; | 1693 }; |
1691 | 1694 |
1692 | 1695 |
1693 class Call V8_FINAL : public Expression { | 1696 class Call V8_FINAL : public Expression { |
1694 public: | 1697 public: |
1695 DECLARE_NODE_TYPE(Call) | 1698 DECLARE_NODE_TYPE(Call) |
1696 | 1699 |
1697 Expression* expression() const { return expression_; } | 1700 Expression* expression() const { return expression_; } |
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3254 private: | 3257 private: |
3255 Isolate* isolate_; | 3258 Isolate* isolate_; |
3256 Zone* zone_; | 3259 Zone* zone_; |
3257 Visitor visitor_; | 3260 Visitor visitor_; |
3258 }; | 3261 }; |
3259 | 3262 |
3260 | 3263 |
3261 } } // namespace v8::internal | 3264 } } // namespace v8::internal |
3262 | 3265 |
3263 #endif // V8_AST_H_ | 3266 #endif // V8_AST_H_ |
OLD | NEW |