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::kNumberOrOddball: | |
153 return CompareOperationHint::kNumberOrOddball; | |
154 case CompareOperationFeedback::kString: | 152 case CompareOperationFeedback::kString: |
155 return CompareOperationHint::kString; | 153 return CompareOperationHint::kString; |
156 default: | 154 default: |
157 return CompareOperationHint::kAny; | 155 return CompareOperationHint::kAny; |
158 } | 156 } |
159 UNREACHABLE(); | 157 UNREACHABLE(); |
160 return CompareOperationHint::kNone; | 158 return CompareOperationHint::kNone; |
161 } | 159 } |
162 | 160 |
163 void TypeFeedbackVector::ComputeCounts(int* with_type_info, int* generic, | 161 void TypeFeedbackVector::ComputeCounts(int* with_type_info, int* generic, |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 int index = vector()->GetIndex(slot()) + 1; | 290 int index = vector()->GetIndex(slot()) + 1; |
293 vector()->set(index, feedback_extra, mode); | 291 vector()->set(index, feedback_extra, mode); |
294 } | 292 } |
295 | 293 |
296 | 294 |
297 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } | 295 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } |
298 } // namespace internal | 296 } // namespace internal |
299 } // namespace v8 | 297 } // namespace v8 |
300 | 298 |
301 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_ | 299 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_ |
OLD | NEW |