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_TYPE_FEEDBACK_VECTOR_INL_H_ | 5 #ifndef V8_TYPE_FEEDBACK_VECTOR_INL_H_ |
6 #define V8_TYPE_FEEDBACK_VECTOR_INL_H_ | 6 #define V8_TYPE_FEEDBACK_VECTOR_INL_H_ |
7 | 7 |
8 #include "src/globals.h" | 8 #include "src/globals.h" |
9 #include "src/type-feedback-vector.h" | 9 #include "src/type-feedback-vector.h" |
10 | 10 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 142 |
143 // Helper function to transform the feedback to CompareOperationHint. | 143 // Helper function to transform the feedback to CompareOperationHint. |
144 CompareOperationHint CompareOperationHintFromFeedback(int type_feedback) { | 144 CompareOperationHint CompareOperationHintFromFeedback(int type_feedback) { |
145 switch (type_feedback) { | 145 switch (type_feedback) { |
146 case CompareOperationFeedback::kNone: | 146 case CompareOperationFeedback::kNone: |
147 return CompareOperationHint::kNone; | 147 return CompareOperationHint::kNone; |
148 case CompareOperationFeedback::kSignedSmall: | 148 case CompareOperationFeedback::kSignedSmall: |
149 return CompareOperationHint::kSignedSmall; | 149 return CompareOperationHint::kSignedSmall; |
150 case CompareOperationFeedback::kNumber: | 150 case CompareOperationFeedback::kNumber: |
151 return CompareOperationHint::kNumber; | 151 return CompareOperationHint::kNumber; |
| 152 case CompareOperationFeedback::kString: |
| 153 return CompareOperationHint::kString; |
152 default: | 154 default: |
153 return CompareOperationHint::kAny; | 155 return CompareOperationHint::kAny; |
154 } | 156 } |
155 UNREACHABLE(); | 157 UNREACHABLE(); |
156 return CompareOperationHint::kNone; | 158 return CompareOperationHint::kNone; |
157 } | 159 } |
158 | 160 |
159 void TypeFeedbackVector::ComputeCounts(int* with_type_info, int* generic, | 161 void TypeFeedbackVector::ComputeCounts(int* with_type_info, int* generic, |
160 int* vector_ic_count, | 162 int* vector_ic_count, |
161 bool code_is_interpreted) { | 163 bool code_is_interpreted) { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 int index = vector()->GetIndex(slot()) + 1; | 290 int index = vector()->GetIndex(slot()) + 1; |
289 vector()->set(index, feedback_extra, mode); | 291 vector()->set(index, feedback_extra, mode); |
290 } | 292 } |
291 | 293 |
292 | 294 |
293 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } | 295 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } |
294 } // namespace internal | 296 } // namespace internal |
295 } // namespace v8 | 297 } // namespace v8 |
296 | 298 |
297 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_ | 299 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_ |
OLD | NEW |