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 |