| 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);
|
| }
|
|
|
|
|