Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: src/ic/ic.cc

Issue 816653002: Monomorphic and polymorphic ICs with cleared maps should not go megamorphic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « no previous file | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698