OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_COMPILER_JS_OPERATOR_H_ | 5 #ifndef V8_COMPILER_JS_OPERATOR_H_ |
6 #define V8_COMPILER_JS_OPERATOR_H_ | 6 #define V8_COMPILER_JS_OPERATOR_H_ |
7 | 7 |
8 #include "src/runtime/runtime.h" | 8 #include "src/runtime/runtime.h" |
9 #include "src/unique.h" | 9 #include "src/unique.h" |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 | 98 |
99 class VectorSlotPair { | 99 class VectorSlotPair { |
100 public: | 100 public: |
101 VectorSlotPair(Handle<TypeFeedbackVector> vector, FeedbackVectorICSlot slot) | 101 VectorSlotPair(Handle<TypeFeedbackVector> vector, FeedbackVectorICSlot slot) |
102 : vector_(vector), slot_(slot) {} | 102 : vector_(vector), slot_(slot) {} |
103 | 103 |
104 Handle<TypeFeedbackVector> vector() const { return vector_; } | 104 Handle<TypeFeedbackVector> vector() const { return vector_; } |
105 FeedbackVectorICSlot slot() const { return slot_; } | 105 FeedbackVectorICSlot slot() const { return slot_; } |
106 | 106 |
| 107 int index() const { return vector_->GetIndex(slot_); } |
| 108 |
107 private: | 109 private: |
108 const Handle<TypeFeedbackVector> vector_; | 110 const Handle<TypeFeedbackVector> vector_; |
109 const FeedbackVectorICSlot slot_; | 111 const FeedbackVectorICSlot slot_; |
110 }; | 112 }; |
111 | 113 |
112 | 114 |
113 bool operator==(VectorSlotPair const& lhs, VectorSlotPair const& rhs); | 115 bool operator==(VectorSlotPair const& lhs, VectorSlotPair const& rhs); |
114 | 116 |
115 | 117 |
116 // Defines the property being loaded from an object by a named load. This is | 118 // Defines the property being loaded from an object by a named load. This is |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 266 |
265 const JSOperatorBuilderImpl& impl_; | 267 const JSOperatorBuilderImpl& impl_; |
266 Zone* const zone_; | 268 Zone* const zone_; |
267 }; | 269 }; |
268 | 270 |
269 } // namespace compiler | 271 } // namespace compiler |
270 } // namespace internal | 272 } // namespace internal |
271 } // namespace v8 | 273 } // namespace v8 |
272 | 274 |
273 #endif // V8_COMPILER_JS_OPERATOR_H_ | 275 #endif // V8_COMPILER_JS_OPERATOR_H_ |
OLD | NEW |