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 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1662 // Type feedback information. | 1662 // Type feedback information. |
1663 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); | 1663 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); |
1664 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } | 1664 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } |
1665 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { | 1665 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { |
1666 return &receiver_types_; | 1666 return &receiver_types_; |
1667 } | 1667 } |
1668 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { | 1668 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { |
1669 return STANDARD_STORE; | 1669 return STANDARD_STORE; |
1670 } | 1670 } |
1671 bool IsUninitialized() { return is_uninitialized_; } | 1671 bool IsUninitialized() { return is_uninitialized_; } |
| 1672 bool IsPreMonomorphic() { return is_pre_monomorphic_; } |
| 1673 bool HasNoTypeInformation() { |
| 1674 return is_uninitialized_ || is_pre_monomorphic_; |
| 1675 } |
1672 TypeFeedbackId PropertyFeedbackId() { return reuse(id()); } | 1676 TypeFeedbackId PropertyFeedbackId() { return reuse(id()); } |
1673 | 1677 |
1674 protected: | 1678 protected: |
1675 Property(Isolate* isolate, | 1679 Property(Isolate* isolate, |
1676 Expression* obj, | 1680 Expression* obj, |
1677 Expression* key, | 1681 Expression* key, |
1678 int pos) | 1682 int pos) |
1679 : Expression(isolate, pos), | 1683 : Expression(isolate, pos), |
1680 obj_(obj), | 1684 obj_(obj), |
1681 key_(key), | 1685 key_(key), |
1682 load_id_(GetNextId(isolate)), | 1686 load_id_(GetNextId(isolate)), |
1683 is_monomorphic_(false), | 1687 is_monomorphic_(false), |
| 1688 is_pre_monomorphic_(false), |
1684 is_uninitialized_(false), | 1689 is_uninitialized_(false), |
1685 is_string_access_(false), | 1690 is_string_access_(false), |
1686 is_function_prototype_(false) { } | 1691 is_function_prototype_(false) { } |
1687 | 1692 |
1688 private: | 1693 private: |
1689 Expression* obj_; | 1694 Expression* obj_; |
1690 Expression* key_; | 1695 Expression* key_; |
1691 const BailoutId load_id_; | 1696 const BailoutId load_id_; |
1692 | 1697 |
1693 SmallMapList receiver_types_; | 1698 SmallMapList receiver_types_; |
1694 bool is_monomorphic_ : 1; | 1699 bool is_monomorphic_ : 1; |
| 1700 bool is_pre_monomorphic_ : 1; |
1695 bool is_uninitialized_ : 1; | 1701 bool is_uninitialized_ : 1; |
1696 bool is_string_access_ : 1; | 1702 bool is_string_access_ : 1; |
1697 bool is_function_prototype_ : 1; | 1703 bool is_function_prototype_ : 1; |
1698 }; | 1704 }; |
1699 | 1705 |
1700 | 1706 |
1701 class Call V8_FINAL : public Expression { | 1707 class Call V8_FINAL : public Expression { |
1702 public: | 1708 public: |
1703 DECLARE_NODE_TYPE(Call) | 1709 DECLARE_NODE_TYPE(Call) |
1704 | 1710 |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2091 // This check relies on the definition order of token in token.h. | 2097 // This check relies on the definition order of token in token.h. |
2092 bool is_compound() const { return op() > Token::ASSIGN; } | 2098 bool is_compound() const { return op() > Token::ASSIGN; } |
2093 | 2099 |
2094 BailoutId AssignmentId() const { return assignment_id_; } | 2100 BailoutId AssignmentId() const { return assignment_id_; } |
2095 | 2101 |
2096 // Type feedback information. | 2102 // Type feedback information. |
2097 TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); } | 2103 TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); } |
2098 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); | 2104 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); |
2099 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } | 2105 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } |
2100 bool IsUninitialized() { return is_uninitialized_; } | 2106 bool IsUninitialized() { return is_uninitialized_; } |
| 2107 bool IsPreMonomorphic() { return is_pre_monomorphic_; } |
| 2108 bool HasNoTypeInformation() { |
| 2109 return is_uninitialized_ || is_pre_monomorphic_; |
| 2110 } |
2101 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { | 2111 virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { |
2102 return &receiver_types_; | 2112 return &receiver_types_; |
2103 } | 2113 } |
2104 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { | 2114 virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { |
2105 return store_mode_; | 2115 return store_mode_; |
2106 } | 2116 } |
2107 | 2117 |
2108 protected: | 2118 protected: |
2109 Assignment(Isolate* isolate, | 2119 Assignment(Isolate* isolate, |
2110 Token::Value op, | 2120 Token::Value op, |
(...skipping 12 matching lines...) Expand all Loading... |
2123 | 2133 |
2124 private: | 2134 private: |
2125 Token::Value op_; | 2135 Token::Value op_; |
2126 Expression* target_; | 2136 Expression* target_; |
2127 Expression* value_; | 2137 Expression* value_; |
2128 BinaryOperation* binary_operation_; | 2138 BinaryOperation* binary_operation_; |
2129 const BailoutId assignment_id_; | 2139 const BailoutId assignment_id_; |
2130 | 2140 |
2131 bool is_monomorphic_ : 1; | 2141 bool is_monomorphic_ : 1; |
2132 bool is_uninitialized_ : 1; | 2142 bool is_uninitialized_ : 1; |
| 2143 bool is_pre_monomorphic_ : 1; |
2133 KeyedAccessStoreMode store_mode_ : 5; // Windows treats as signed, | 2144 KeyedAccessStoreMode store_mode_ : 5; // Windows treats as signed, |
2134 // must have extra bit. | 2145 // must have extra bit. |
2135 SmallMapList receiver_types_; | 2146 SmallMapList receiver_types_; |
2136 }; | 2147 }; |
2137 | 2148 |
2138 | 2149 |
2139 class Yield V8_FINAL : public Expression { | 2150 class Yield V8_FINAL : public Expression { |
2140 public: | 2151 public: |
2141 DECLARE_NODE_TYPE(Yield) | 2152 DECLARE_NODE_TYPE(Yield) |
2142 | 2153 |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3254 private: | 3265 private: |
3255 Isolate* isolate_; | 3266 Isolate* isolate_; |
3256 Zone* zone_; | 3267 Zone* zone_; |
3257 Visitor visitor_; | 3268 Visitor visitor_; |
3258 }; | 3269 }; |
3259 | 3270 |
3260 | 3271 |
3261 } } // namespace v8::internal | 3272 } } // namespace v8::internal |
3262 | 3273 |
3263 #endif // V8_AST_H_ | 3274 #endif // V8_AST_H_ |
OLD | NEW |