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

Unified Diff: src/stub-cache.cc

Issue 19663007: Avoid repeated rewrites of global store to constant IC due to store of same value. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months 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/code-stubs-hydrogen.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index 436cd46ce162df28ac14c17a1f37d533393f6004..d554d0cb0a5bb9a1490a0e8b7cd07e382382e432 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -563,16 +563,15 @@ Handle<Code> StubCache::ComputeStoreGlobal(Handle<Name> name,
Code::STORE_IC, Code::NORMAL, stub.GetExtraICState());
if (!code.is_null()) return code;
- if (is_constant) return stub.GetCode(isolate_);
-
// Replace the placeholder cell and global object map with the actual global
// cell and receiver map.
- Handle<Map> cell_map(isolate_->heap()->global_property_cell_map());
Handle<Map> meta_map(isolate_->heap()->meta_map());
Handle<Object> receiver_map(receiver->map(), isolate_);
code = stub.GetCodeCopyFromTemplate(isolate_);
code->ReplaceNthObject(1, *meta_map, *receiver_map);
+ Handle<Map> cell_map(isolate_->heap()->global_property_cell_map());
code->ReplaceNthObject(1, *cell_map, *cell);
+
JSObject::UpdateMapCodeCache(receiver, name, code);
return code;
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698