diff options
Diffstat (limited to 'deps/v8/src/feedback-vector-inl.h')
-rw-r--r-- | deps/v8/src/feedback-vector-inl.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/deps/v8/src/feedback-vector-inl.h b/deps/v8/src/feedback-vector-inl.h index 54d287a3b7..e14381f2ab 100644 --- a/deps/v8/src/feedback-vector-inl.h +++ b/deps/v8/src/feedback-vector-inl.h @@ -31,7 +31,7 @@ bool FeedbackMetadata::is_empty() const { int FeedbackMetadata::slot_count() const { if (length() == 0) return 0; - DCHECK(length() > kReservedIndexCount); + DCHECK_GT(length(), kReservedIndexCount); return Smi::ToInt(get(kSlotsCountIndex)); } @@ -44,6 +44,7 @@ FeedbackVector* FeedbackVector::cast(Object* obj) { int FeedbackMetadata::GetSlotSize(FeedbackSlotKind kind) { switch (kind) { case FeedbackSlotKind::kForIn: + case FeedbackSlotKind::kInstanceOf: case FeedbackSlotKind::kCompareOp: case FeedbackSlotKind::kBinaryOp: case FeedbackSlotKind::kLiteral: @@ -293,6 +294,16 @@ void FeedbackVector::ComputeCounts(int* with_type_info, int* generic, total++; break; } + case FeedbackSlotKind::kInstanceOf: { + if (obj->IsWeakCell()) { + with++; + } else if (obj == megamorphic_sentinel) { + gen++; + with++; + } + total++; + break; + } case FeedbackSlotKind::kCreateClosure: case FeedbackSlotKind::kLiteral: break; |