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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 2481053002: [crankshaft] Fix deoptimization loop w/ non-monomorphic arguments access. (Closed)
Patch Set: Created 4 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 | « no previous file | test/mjsunit/compiler/deopt-arguments-oob.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index 2e0695dfdf8b4902ef1366226b0f9c5282403036..4cdf74782e26fe4743be78491bcb9840e34b8ad1 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -7452,6 +7452,9 @@ bool HOptimizedGraphBuilder::TryArgumentsAccess(Property* expr) {
result = New<HConstant>(argument_count);
}
} else {
+ // We need to take into account the KEYED_LOAD_IC feedback to guard the
+ // HBoundsCheck instructions below.
+ if (!expr->IsMonomorphic()) return false;
CHECK_ALIVE_OR_RETURN(VisitForValue(expr->obj(), ARGUMENTS_ALLOWED), true);
CHECK_ALIVE_OR_RETURN(VisitForValue(expr->key()), true);
HValue* key = Pop();
« no previous file with comments | « no previous file | test/mjsunit/compiler/deopt-arguments-oob.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698