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

Unified Diff: src/ic/ic.cc

Issue 2548753003: [ic] Ensure state of load/store ICs always progresses. (Closed)
Patch Set: Created 4 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 | « src/counters.h ('k') | test/mjsunit/regress/regress-v8-5697.js » ('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 38fe3314b0630eaf0d8e244c2e190108b6ac65b4..cb76f482666f1d0e15bff0b81327dddc29b144ab 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -621,6 +621,13 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
// If the object is undefined or null it's illegal to try to get any
// of its properties; throw a TypeError in that case.
if (object->IsUndefined(isolate()) || object->IsNull(isolate())) {
+ if (FLAG_use_ic && state() != UNINITIALIZED && state() != PREMONOMORPHIC) {
+ // Ensure the IC state progresses.
+ TRACE_HANDLER_STATS(isolate(), LoadIC_NonReceiver);
+ update_receiver_map(object);
+ PatchCache(name, slow_stub());
+ TRACE_IC("LoadIC", name);
+ }
return TypeError(MessageTemplate::kNonObjectPropertyLoad, object, name);
}
@@ -1821,6 +1828,13 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name,
// If the object is undefined or null it's illegal to try to set any
// properties on it; throw a TypeError in that case.
if (object->IsUndefined(isolate()) || object->IsNull(isolate())) {
+ if (FLAG_use_ic && state() != UNINITIALIZED && state() != PREMONOMORPHIC) {
+ // Ensure the IC state progresses.
+ TRACE_HANDLER_STATS(isolate(), StoreIC_NonReceiver);
+ update_receiver_map(object);
+ PatchCache(name, slow_stub());
+ TRACE_IC("StoreIC", name);
+ }
return TypeError(MessageTemplate::kNonObjectPropertyStore, object, name);
}
« no previous file with comments | « src/counters.h ('k') | test/mjsunit/regress/regress-v8-5697.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698