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

Unified Diff: src/ic/ic.cc

Issue 712973002: harmony-scoping: Implement StoreIC handler for stores to global contexts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments + rebased Created 6 years, 1 month 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/hydrogen.cc ('k') | test/cctest/test-decls.cc » ('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 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;
}
« no previous file with comments | « src/hydrogen.cc ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698