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

Unified Diff: src/ic/ic.cc

Issue 2036493006: Keep prototype maps in dictionary mode until ICs see them (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: make ignition tests happy Created 4 years, 6 months 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 | « src/ic/handler-compiler.cc ('k') | src/keys.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 066b3b45aab85507c35c8b0e7f5b952cd5dd9e5d..bafaffff7eaf5cf7392eb5cf3b19d93e46f8d592 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -227,7 +227,6 @@ bool IC::AddressIsOptimizedCode() const {
return host->kind() == Code::OPTIMIZED_FUNCTION;
}
-
static void LookupForRead(LookupIterator* it) {
for (; it->IsFound(); it->Next()) {
switch (it->state()) {
@@ -641,6 +640,9 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
}
}
+ if (state() != UNINITIALIZED) {
+ JSObject::MakePrototypesFast(object, kStartAtReceiver, isolate());
+ }
// Named lookup in the object.
LookupIterator it(object, name);
LookupForRead(&it);
@@ -1530,6 +1532,9 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name,
return TypeError(MessageTemplate::kNonObjectPropertyStore, object, name);
}
+ if (state() != UNINITIALIZED) {
+ JSObject::MakePrototypesFast(object, kStartAtPrototype, isolate());
+ }
LookupIterator it(object, name);
if (FLAG_use_ic) UpdateCaches(&it, value, store_mode);
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/keys.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698