| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index f7b310003e0c1140936a8c86d51638534acd824a..2b77c35af4c08f81d90c72b2e043fa8c737c2f26 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -5120,10 +5120,15 @@ void HOptimizedGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
|
| // pass an empty fixed array to the runtime function instead.
|
| Handle<FixedArray> constants = isolate()->factory()->empty_fixed_array();
|
| int literal_index = expr->literal_index();
|
| + int flags = expr->depth() == 1
|
| + ? ArrayLiteral::kShallowElements
|
| + : ArrayLiteral::kNoFlags;
|
| + flags |= ArrayLiteral::kDisableMementos;
|
|
|
| Add<HPushArgument>(Add<HConstant>(literals));
|
| Add<HPushArgument>(Add<HConstant>(literal_index));
|
| Add<HPushArgument>(Add<HConstant>(constants));
|
| + Add<HPushArgument>(Add<HConstant>(flags));
|
|
|
| // TODO(mvstanton): Consider a flag to turn off creation of any
|
| // AllocationMementos for this call: we are in crankshaft and should have
|
| @@ -5131,7 +5136,7 @@ void HOptimizedGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
|
| Runtime::FunctionId function_id = Runtime::kCreateArrayLiteral;
|
| literal = Add<HCallRuntime>(isolate()->factory()->empty_string(),
|
| Runtime::FunctionForId(function_id),
|
| - 3);
|
| + 4);
|
|
|
| // De-opt if elements kind changed from boilerplate_elements_kind.
|
| Handle<Map> map = Handle<Map>(boilerplate_object->map(), isolate());
|
|
|