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 { ...@@ -575,25 +575,29 @@ InlineCacheState FeedbackNexus::StateFromFeedback() const {
case FeedbackSlotKind::kLoadKeyed: { case FeedbackSlotKind::kLoadKeyed: {
if (feedback == *FeedbackVector::UninitializedSentinel(isolate)) { if (feedback == *FeedbackVector::UninitializedSentinel(isolate)) {
return UNINITIALIZED; return UNINITIALIZED;
} else if (feedback == *FeedbackVector::MegamorphicSentinel(isolate)) { }
if (feedback == *FeedbackVector::MegamorphicSentinel(isolate)) {
return MEGAMORPHIC; return MEGAMORPHIC;
} else if (feedback == *FeedbackVector::PremonomorphicSentinel(isolate)) { }
if (feedback == *FeedbackVector::PremonomorphicSentinel(isolate)) {
return PREMONOMORPHIC; return PREMONOMORPHIC;
} else if (feedback->IsFixedArray()) { }
if (feedback->IsFixedArray()) {
// Determine state purely by our structure, don't check if the maps are // Determine state purely by our structure, don't check if the maps are
// cleared. // cleared.
return POLYMORPHIC; return POLYMORPHIC;
} else if (feedback->IsWeakCell()) { }
if (feedback->IsWeakCell()) {
// Don't check if the map is cleared. // Don't check if the map is cleared.
return MONOMORPHIC; return MONOMORPHIC;
} else if (feedback->IsName()) { }
if (feedback->IsName()) {
DCHECK(IsKeyedLoadICKind(kind()) || IsKeyedStoreICKind(kind())); DCHECK(IsKeyedLoadICKind(kind()) || IsKeyedStoreICKind(kind()));
Object* extra = GetFeedbackExtra(); Object* extra = GetFeedbackExtra();
FixedArray* extra_array = FixedArray::cast(extra); FixedArray* extra_array = FixedArray::cast(extra);
return extra_array->length() > 2 ? POLYMORPHIC : MONOMORPHIC; return extra_array->length() > 2 ? POLYMORPHIC : MONOMORPHIC;
} }
UNREACHABLE();
return UNINITIALIZED;
} }
case FeedbackSlotKind::kCall: { case FeedbackSlotKind::kCall: {
if (feedback == *FeedbackVector::MegamorphicSentinel(isolate)) { 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