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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 // Helper function to transform the feedback to BinaryOperationHint. | 123 // Helper function to transform the feedback to BinaryOperationHint. |
124 BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback) { | 124 BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback) { |
125 switch (type_feedback) { | 125 switch (type_feedback) { |
126 case BinaryOperationFeedback::kNone: | 126 case BinaryOperationFeedback::kNone: |
127 return BinaryOperationHint::kNone; | 127 return BinaryOperationHint::kNone; |
128 case BinaryOperationFeedback::kSignedSmall: | 128 case BinaryOperationFeedback::kSignedSmall: |
129 return BinaryOperationHint::kSignedSmall; | 129 return BinaryOperationHint::kSignedSmall; |
130 case BinaryOperationFeedback::kNumber: | 130 case BinaryOperationFeedback::kNumber: |
131 return BinaryOperationHint::kNumberOrOddball; | 131 return BinaryOperationHint::kNumberOrOddball; |
| 132 case BinaryOperationFeedback::kString: |
| 133 return BinaryOperationHint::kString; |
132 case BinaryOperationFeedback::kAny: | 134 case BinaryOperationFeedback::kAny: |
133 default: | 135 default: |
134 return BinaryOperationHint::kAny; | 136 return BinaryOperationHint::kAny; |
135 } | 137 } |
136 UNREACHABLE(); | 138 UNREACHABLE(); |
137 return BinaryOperationHint::kNone; | 139 return BinaryOperationHint::kNone; |
138 } | 140 } |
139 | 141 |
140 // Helper function to transform the feedback to CompareOperationHint. | 142 // Helper function to transform the feedback to CompareOperationHint. |
141 CompareOperationHint CompareOperationHintFromFeedback(int type_feedback) { | 143 CompareOperationHint CompareOperationHintFromFeedback(int type_feedback) { |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 int index = vector()->GetIndex(slot()) + 1; | 278 int index = vector()->GetIndex(slot()) + 1; |
277 vector()->set(index, feedback_extra, mode); | 279 vector()->set(index, feedback_extra, mode); |
278 } | 280 } |
279 | 281 |
280 | 282 |
281 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } | 283 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } |
282 } // namespace internal | 284 } // namespace internal |
283 } // namespace v8 | 285 } // namespace v8 |
284 | 286 |
285 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_ | 287 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_ |
OLD | NEW |