Commit b17a1679 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[ic] Remove impossible case in FeedbackNexus::StateFromFeedback.

Also slightly restructure if-chain for readability.

Bug: 
Change-Id: I1903106f412e559536bac3369610f40fa6b58680
Reviewed-on: https://chromium-review.googlesource.com/901502Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51094}
parent 992f7cc9
......@@ -575,25 +575,29 @@ InlineCacheState FeedbackNexus::StateFromFeedback() const {
case FeedbackSlotKind::kLoadKeyed: {
if (feedback == *FeedbackVector::UninitializedSentinel(isolate)) {
return UNINITIALIZED;
} else if (feedback == *FeedbackVector::MegamorphicSentinel(isolate)) {
}
if (feedback == *FeedbackVector::MegamorphicSentinel(isolate)) {
return MEGAMORPHIC;
} else if (feedback == *FeedbackVector::PremonomorphicSentinel(isolate)) {
}
if (feedback == *FeedbackVector::PremonomorphicSentinel(isolate)) {
return PREMONOMORPHIC;
} else if (feedback->IsFixedArray()) {
}
if (feedback->IsFixedArray()) {
// Determine state purely by our structure, don't check if the maps are
// cleared.
return POLYMORPHIC;
} else if (feedback->IsWeakCell()) {
}
if (feedback->IsWeakCell()) {
// Don't check if the map is cleared.
return MONOMORPHIC;
} else if (feedback->IsName()) {
}
if (feedback->IsName()) {
DCHECK(IsKeyedLoadICKind(kind()) || IsKeyedStoreICKind(kind()));
Object* extra = GetFeedbackExtra();
FixedArray* extra_array = FixedArray::cast(extra);
return extra_array->length() > 2 ? POLYMORPHIC : MONOMORPHIC;
}
return UNINITIALIZED;
UNREACHABLE();
}
case FeedbackSlotKind::kCall: {
if (feedback == *FeedbackVector::MegamorphicSentinel(isolate)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment