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

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: fix tests & rebase 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/factory.cc ('k') | src/objects.h » ('j') | src/objects.h » ('J')
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 8036a6ede1d6618e07235f0e2dcb2ea6ba491971..bf6768d69c305e15f330a4bcb0dfaef4a060a28b 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -223,7 +223,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,10 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
}
}
+ if (state() != UNINITIALIZED) {
+ JSObject::MakePrototypesFast(object, true /* include_receiver */,
+ isolate());
+ }
// Named lookup in the object.
LookupIterator it(object, name);
LookupForRead(&it);
@@ -1530,6 +1533,10 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name,
return TypeError(MessageTemplate::kNonObjectPropertyStore, object, name);
}
+ if (state() != UNINITIALIZED) {
+ JSObject::MakePrototypesFast(object, false /* include_receiver */,
+ isolate());
+ }
LookupIterator it(object, name);
if (FLAG_use_ic) UpdateCaches(&it, value, store_mode);
« no previous file with comments | « src/factory.cc ('k') | src/objects.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698