| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 case FeedbackVectorSlotKind::INTERPRETER_BINARYOP_IC: | 192 case FeedbackVectorSlotKind::INTERPRETER_BINARYOP_IC: |
| 193 // If we are not running interpreted code, we need to ignore the special | 193 // If we are not running interpreted code, we need to ignore the special |
| 194 // IC slots for binaryop/compare used by the interpreter. | 194 // IC slots for binaryop/compare used by the interpreter. |
| 195 // TODO(mvstanton): Remove code_is_interpreted when full code is retired | 195 // TODO(mvstanton): Remove code_is_interpreted when full code is retired |
| 196 // from service. | 196 // from service. |
| 197 if (code_is_interpreted) { | 197 if (code_is_interpreted) { |
| 198 int const feedback = Smi::cast(obj)->value(); | 198 int const feedback = Smi::cast(obj)->value(); |
| 199 BinaryOperationHint hint = BinaryOperationHintFromFeedback(feedback); | 199 BinaryOperationHint hint = BinaryOperationHintFromFeedback(feedback); |
| 200 if (hint == BinaryOperationHint::kAny) { | 200 if (hint == BinaryOperationHint::kAny) { |
| 201 gen++; | 201 gen++; |
| 202 } else if (hint != BinaryOperationHint::kNone) { | 202 } |
| 203 if (hint != BinaryOperationHint::kNone) { |
| 203 with++; | 204 with++; |
| 204 } | 205 } |
| 205 total++; | 206 total++; |
| 206 } | 207 } |
| 207 break; | 208 break; |
| 208 case FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC: { | 209 case FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC: { |
| 209 // If we are not running interpreted code, we need to ignore the special | 210 // If we are not running interpreted code, we need to ignore the special |
| 210 // IC slots for binaryop/compare used by the interpreter. | 211 // IC slots for binaryop/compare used by the interpreter. |
| 211 // TODO(mvstanton): Remove code_is_interpreted when full code is retired | 212 // TODO(mvstanton): Remove code_is_interpreted when full code is retired |
| 212 // from service. | 213 // from service. |
| 213 if (code_is_interpreted) { | 214 if (code_is_interpreted) { |
| 214 int const feedback = Smi::cast(obj)->value(); | 215 int const feedback = Smi::cast(obj)->value(); |
| 215 CompareOperationHint hint = | 216 CompareOperationHint hint = |
| 216 CompareOperationHintFromFeedback(feedback); | 217 CompareOperationHintFromFeedback(feedback); |
| 217 if (hint == CompareOperationHint::kAny) { | 218 if (hint == CompareOperationHint::kAny) { |
| 218 gen++; | 219 gen++; |
| 219 } else if (hint != CompareOperationHint::kNone) { | 220 } |
| 221 if (hint != CompareOperationHint::kNone) { |
| 220 with++; | 222 with++; |
| 221 } | 223 } |
| 222 total++; | 224 total++; |
| 223 } | 225 } |
| 224 break; | 226 break; |
| 225 } | 227 } |
| 226 case FeedbackVectorSlotKind::CREATE_CLOSURE: | 228 case FeedbackVectorSlotKind::CREATE_CLOSURE: |
| 227 case FeedbackVectorSlotKind::GENERAL: | 229 case FeedbackVectorSlotKind::GENERAL: |
| 228 case FeedbackVectorSlotKind::LITERAL: | 230 case FeedbackVectorSlotKind::LITERAL: |
| 229 break; | 231 break; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 int index = vector()->GetIndex(slot()) + 1; | 300 int index = vector()->GetIndex(slot()) + 1; |
| 299 vector()->set(index, feedback_extra, mode); | 301 vector()->set(index, feedback_extra, mode); |
| 300 } | 302 } |
| 301 | 303 |
| 302 | 304 |
| 303 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } | 305 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } |
| 304 } // namespace internal | 306 } // namespace internal |
| 305 } // namespace v8 | 307 } // namespace v8 |
| 306 | 308 |
| 307 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_ | 309 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_ |
| OLD | NEW |