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_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 | 10 |
(...skipping 6698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6709 HValue* object() const { return OperandAt(0); } | 6709 HValue* object() const { return OperandAt(0); } |
6710 HValue* key() const { return OperandAt(1); } | 6710 HValue* key() const { return OperandAt(1); } |
6711 HValue* context() const { return OperandAt(2); } | 6711 HValue* context() const { return OperandAt(2); } |
6712 InlineCacheState initialization_state() const { | 6712 InlineCacheState initialization_state() const { |
6713 return initialization_state_; | 6713 return initialization_state_; |
6714 } | 6714 } |
6715 FeedbackVectorICSlot slot() const { return slot_; } | 6715 FeedbackVectorICSlot slot() const { return slot_; } |
6716 Handle<TypeFeedbackVector> feedback_vector() const { | 6716 Handle<TypeFeedbackVector> feedback_vector() const { |
6717 return feedback_vector_; | 6717 return feedback_vector_; |
6718 } | 6718 } |
6719 bool HasVectorAndSlot() const { return FLAG_vector_ics; } | 6719 bool HasVectorAndSlot() const { |
| 6720 DCHECK(!FLAG_vector_ics || initialization_state_ == MEGAMORPHIC || |
| 6721 feedback_vector_.is_null()); |
| 6722 return !feedback_vector_.is_null(); |
| 6723 } |
6720 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | 6724 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, |
6721 FeedbackVectorICSlot slot) { | 6725 FeedbackVectorICSlot slot) { |
6722 DCHECK(FLAG_vector_ics); | 6726 DCHECK(FLAG_vector_ics); |
6723 feedback_vector_ = vector; | 6727 feedback_vector_ = vector; |
6724 slot_ = slot; | 6728 slot_ = slot; |
6725 } | 6729 } |
6726 | 6730 |
6727 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT | 6731 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT |
6728 | 6732 |
6729 Representation RequiredInputRepresentation(int index) OVERRIDE { | 6733 Representation RequiredInputRepresentation(int index) OVERRIDE { |
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7873 }; | 7877 }; |
7874 | 7878 |
7875 | 7879 |
7876 | 7880 |
7877 #undef DECLARE_INSTRUCTION | 7881 #undef DECLARE_INSTRUCTION |
7878 #undef DECLARE_CONCRETE_INSTRUCTION | 7882 #undef DECLARE_CONCRETE_INSTRUCTION |
7879 | 7883 |
7880 } } // namespace v8::internal | 7884 } } // namespace v8::internal |
7881 | 7885 |
7882 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7886 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |