| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 return reinterpret_cast<TypeFeedbackVector*>(obj); | 49 return reinterpret_cast<TypeFeedbackVector*>(obj); |
| 50 } | 50 } |
| 51 | 51 |
| 52 | 52 |
| 53 int TypeFeedbackMetadata::GetSlotSize(FeedbackVectorSlotKind kind) { | 53 int TypeFeedbackMetadata::GetSlotSize(FeedbackVectorSlotKind kind) { |
| 54 DCHECK_NE(FeedbackVectorSlotKind::INVALID, kind); | 54 DCHECK_NE(FeedbackVectorSlotKind::INVALID, kind); |
| 55 DCHECK_NE(FeedbackVectorSlotKind::KINDS_NUMBER, kind); | 55 DCHECK_NE(FeedbackVectorSlotKind::KINDS_NUMBER, kind); |
| 56 if (kind == FeedbackVectorSlotKind::GENERAL || | 56 if (kind == FeedbackVectorSlotKind::GENERAL || |
| 57 kind == FeedbackVectorSlotKind::INTERPRETER_BINARYOP_IC || | 57 kind == FeedbackVectorSlotKind::INTERPRETER_BINARYOP_IC || |
| 58 kind == FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC || | 58 kind == FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC || |
| 59 kind == FeedbackVectorSlotKind::LITERAL || |
| 59 kind == FeedbackVectorSlotKind::CREATE_CLOSURE) { | 60 kind == FeedbackVectorSlotKind::CREATE_CLOSURE) { |
| 60 return 1; | 61 return 1; |
| 61 } | 62 } |
| 62 | 63 |
| 63 return 2; | 64 return 2; |
| 64 } | 65 } |
| 65 | 66 |
| 66 bool TypeFeedbackVector::is_empty() const { | 67 bool TypeFeedbackVector::is_empty() const { |
| 67 return length() == kReservedIndexCount; | 68 return length() == kReservedIndexCount; |
| 68 } | 69 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 } else if (hint != BinaryOperationHint::kNone) { | 198 } else if (hint != BinaryOperationHint::kNone) { |
| 198 with++; | 199 with++; |
| 199 } | 200 } |
| 200 } | 201 } |
| 201 total++; | 202 total++; |
| 202 } | 203 } |
| 203 break; | 204 break; |
| 204 } | 205 } |
| 205 case FeedbackVectorSlotKind::CREATE_CLOSURE: | 206 case FeedbackVectorSlotKind::CREATE_CLOSURE: |
| 206 case FeedbackVectorSlotKind::GENERAL: | 207 case FeedbackVectorSlotKind::GENERAL: |
| 208 case FeedbackVectorSlotKind::LITERAL: |
| 207 break; | 209 break; |
| 208 case FeedbackVectorSlotKind::INVALID: | 210 case FeedbackVectorSlotKind::INVALID: |
| 209 case FeedbackVectorSlotKind::KINDS_NUMBER: | 211 case FeedbackVectorSlotKind::KINDS_NUMBER: |
| 210 UNREACHABLE(); | 212 UNREACHABLE(); |
| 211 break; | 213 break; |
| 212 } | 214 } |
| 213 } | 215 } |
| 214 | 216 |
| 215 *with_type_info = with; | 217 *with_type_info = with; |
| 216 *generic = gen; | 218 *generic = gen; |
| (...skipping 59 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 |