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

Unified Diff: src/hydrogen.cc

Issue 17334004: Bugfix in hydrogen array literal code generation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Nit addressed Created 7 years, 6 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/array-literal-feedback.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 e3bca3bfafabc901e0cc5b70b24faf953354aa2a..9a2072ec9f054cfc311f0265c41fb07ead0f124b 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -6064,6 +6064,11 @@ void HOptimizedGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
isolate()->factory()->empty_string(),
Runtime::FunctionForId(function_id),
3));
+
+ // De-opt if elements kind changed from boilerplate_elements_kind.
+ Handle<Map> map = Handle<Map>(original_boilerplate_object->map(),
+ isolate());
+ AddInstruction(HCheckMaps::New(literal, map, zone()));
}
// The array is expected in the bailout environment during computation
« no previous file with comments | « no previous file | test/mjsunit/array-literal-feedback.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698