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

Unified Diff: src/hydrogen.cc

Issue 25718002: Only fold polymorphic into monomorphic load if all load from either receiver or same prototype. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 | test/mjsunit/regress/regress-polymorphic-load.js » ('j') | 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 f59f988534f20c3b7a63fdb7cc0425b8d0c3e4b5..3705042adc7cff58c835e3894ed697c63766e9ad 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -4707,10 +4707,14 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::IsCompatibleForLoad(
if (!LookupDescriptor()) return false;
if (!lookup_.IsFound()) {
- return (!info->lookup_.IsFound() || !info->holder_.is_null()) &&
+ return (!info->lookup_.IsFound() || info->has_holder()) &&
map_->prototype() == info->map_->prototype();
}
+ // Mismatch if the other access info found the property in the prototype
+ // chain.
+ if (info->has_holder()) return false;
+
if (lookup_.IsPropertyCallbacks()) {
return accessor_.is_identical_to(info->accessor_);
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-polymorphic-load.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698