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 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 // Type feedback information. | 1741 // Type feedback information. |
1742 virtual bool IsMonomorphic() OVERRIDE { | 1742 virtual bool IsMonomorphic() OVERRIDE { |
1743 return receiver_types_.length() == 1; | 1743 return receiver_types_.length() == 1; |
1744 } | 1744 } |
1745 virtual SmallMapList* GetReceiverTypes() OVERRIDE { | 1745 virtual SmallMapList* GetReceiverTypes() OVERRIDE { |
1746 return &receiver_types_; | 1746 return &receiver_types_; |
1747 } | 1747 } |
1748 virtual KeyedAccessStoreMode GetStoreMode() OVERRIDE { | 1748 virtual KeyedAccessStoreMode GetStoreMode() OVERRIDE { |
1749 return STANDARD_STORE; | 1749 return STANDARD_STORE; |
1750 } | 1750 } |
| 1751 virtual IcCheckType GetKeyType() { |
| 1752 // PROPERTY key types currently aren't implemented for KeyedLoadICs. |
| 1753 return ELEMENT; |
| 1754 } |
1751 bool IsUninitialized() { return !is_for_call_ && is_uninitialized_; } | 1755 bool IsUninitialized() { return !is_for_call_ && is_uninitialized_; } |
1752 bool HasNoTypeInformation() { | 1756 bool HasNoTypeInformation() { |
1753 return is_uninitialized_; | 1757 return is_uninitialized_; |
1754 } | 1758 } |
1755 void set_is_uninitialized(bool b) { is_uninitialized_ = b; } | 1759 void set_is_uninitialized(bool b) { is_uninitialized_ = b; } |
1756 void set_is_string_access(bool b) { is_string_access_ = b; } | 1760 void set_is_string_access(bool b) { is_string_access_ = b; } |
1757 void mark_for_call() { is_for_call_ = true; } | 1761 void mark_for_call() { is_for_call_ = true; } |
1758 bool IsForCall() { return is_for_call_; } | 1762 bool IsForCall() { return is_for_call_; } |
1759 | 1763 |
1760 bool IsSuperAccess() { | 1764 bool IsSuperAccess() { |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2117 TypeFeedbackId CountStoreFeedbackId() const { | 2121 TypeFeedbackId CountStoreFeedbackId() const { |
2118 return TypeFeedbackId(base_id() + 2); | 2122 return TypeFeedbackId(base_id() + 2); |
2119 } | 2123 } |
2120 | 2124 |
2121 protected: | 2125 protected: |
2122 CountOperation(Zone* zone, Token::Value op, bool is_prefix, Expression* expr, | 2126 CountOperation(Zone* zone, Token::Value op, bool is_prefix, Expression* expr, |
2123 int pos, IdGen* id_gen) | 2127 int pos, IdGen* id_gen) |
2124 : Expression(zone, pos, num_ids(), id_gen), | 2128 : Expression(zone, pos, num_ids(), id_gen), |
2125 op_(op), | 2129 op_(op), |
2126 is_prefix_(is_prefix), | 2130 is_prefix_(is_prefix), |
| 2131 key_type_(ELEMENT), |
2127 store_mode_(STANDARD_STORE), | 2132 store_mode_(STANDARD_STORE), |
2128 expression_(expr) {} | 2133 expression_(expr) {} |
2129 | 2134 |
2130 static int num_ids() { return 3; } | 2135 static int num_ids() { return 3; } |
2131 int base_id() const { return Expression::base_id() + Expression::num_ids(); } | 2136 int base_id() const { return Expression::base_id() + Expression::num_ids(); } |
2132 | 2137 |
2133 private: | 2138 private: |
2134 Token::Value op_; | 2139 Token::Value op_; |
2135 bool is_prefix_ : 1; | 2140 bool is_prefix_ : 1; |
2136 IcCheckType key_type_ : 1; | 2141 IcCheckType key_type_ : 1; |
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3625 Zone* zone_; | 3630 Zone* zone_; |
3626 Visitor visitor_; | 3631 Visitor visitor_; |
3627 AstValueFactory* ast_value_factory_; | 3632 AstValueFactory* ast_value_factory_; |
3628 AstNode::IdGen* id_gen_; | 3633 AstNode::IdGen* id_gen_; |
3629 }; | 3634 }; |
3630 | 3635 |
3631 | 3636 |
3632 } } // namespace v8::internal | 3637 } } // namespace v8::internal |
3633 | 3638 |
3634 #endif // V8_AST_H_ | 3639 #endif // V8_AST_H_ |
OLD | NEW |