Index: src/ic/ic.cc |
diff --git a/src/ic/ic.cc b/src/ic/ic.cc |
index 2ee76374c7137cc3897130ccdecf56ff3e5deff2..cd8b0835b12762d72561e3e457266401260a9f78 100644 |
--- a/src/ic/ic.cc |
+++ b/src/ic/ic.cc |
@@ -832,7 +832,10 @@ bool IC::UpdatePolymorphicIC(Handle<Name> name, Handle<Code> code) { |
number_of_types - deprecated_types - (handler_to_overwrite != -1); |
if (number_of_valid_types >= 4) return false; |
- if (number_of_types == 0) return false; |
+ if (number_of_types == 0 && state() != MONOMORPHIC && |
+ state() != POLYMORPHIC) { |
+ return false; |
+ } |
if (UseVector()) { |
if (!nexus()->FindHandlers(&handlers, types.length())) return false; |
} else { |