Index: src/ic/ic.cc |
diff --git a/src/ic/ic.cc b/src/ic/ic.cc |
index e83a4b217d4f0b53c1aa8f9f081f1e68a9570291..810a149936fc6226df794e8f2f3f42b7e0880be0 100644 |
--- a/src/ic/ic.cc |
+++ b/src/ic/ic.cc |
@@ -670,6 +670,10 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) { |
GlobalContextTable::LookupResult lookup_result; |
if (GlobalContextTable::Lookup(global_contexts, str_name, &lookup_result)) { |
+ if (use_ic && LoadGlobalContextFieldStub::Accepted(&lookup_result)) { |
+ LoadGlobalContextFieldStub stub(isolate(), &lookup_result); |
+ PatchCache(name, stub.GetCode()); |
+ } |
return FixedArray::get(GlobalContextTable::GetContext( |
global_contexts, lookup_result.context_index), |
lookup_result.slot_index); |