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

Unified Diff: src/hydrogen.cc

Issue 18986003: Don't fast-store to observed objects. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 074ca17fe101efbf5ceb08f4dcfceb16cdaadf11..eb12ea4c8e63049065ff2380cf13edaba880cc8c 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -4774,6 +4774,7 @@ static bool ComputeLoadStoreField(Handle<Map> type,
Handle<String> name,
LookupResult* lookup,
bool is_store) {
+ if (is_store && type->is_observed()) return false;
if (type->has_named_interceptor()) {
lookup->InterceptorResult(NULL);
return false;
@@ -5061,6 +5062,7 @@ bool HOptimizedGraphBuilder::TryStorePolymorphicAsMonomorphic(
Handle<Map> map = types->at(count);
// Pass false to ignore transitions.
if (!ComputeLoadStoreField(map, name, &lookup, false)) break;
+ if (map->is_observed()) return false;
HObjectAccess new_access = HObjectAccess::ForField(map, &lookup, name);
Representation new_representation =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698