| Index: src/ic/ic.cc
|
| diff --git a/src/ic/ic.cc b/src/ic/ic.cc
|
| index 810a149936fc6226df794e8f2f3f42b7e0880be0..82d48a24f85ad03658c047397b5329751b3c9565 100644
|
| --- a/src/ic/ic.cc
|
| +++ b/src/ic/ic.cc
|
| @@ -1396,6 +1396,13 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name,
|
| if (lookup_result.mode == CONST) {
|
| return TypeError("harmony_const_assign", object, name);
|
| }
|
| +
|
| + if (FLAG_use_ic &&
|
| + StoreGlobalContextFieldStub::Accepted(&lookup_result)) {
|
| + StoreGlobalContextFieldStub stub(isolate(), &lookup_result);
|
| + PatchCache(name, stub.GetCode());
|
| + }
|
| +
|
| global_context->set(lookup_result.slot_index, *value);
|
| return value;
|
| }
|
|
|