| Index: src/runtime.cc
 | 
| diff --git a/src/runtime.cc b/src/runtime.cc
 | 
| index b5a108159ad81bac2a1ef8a7e28a287751e712c0..bdd0bc86678ff80b2125fe0d6a16b7a87c519b74 100644
 | 
| --- a/src/runtime.cc
 | 
| +++ b/src/runtime.cc
 | 
| @@ -554,27 +554,54 @@ static Handle<AllocationSite> GetLiteralAllocationSite(
 | 
|  }
 | 
|  
 | 
|  
 | 
| -RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateArrayLiteral) {
 | 
| -  HandleScope scope(isolate);
 | 
| -  ASSERT(args.length() == 3);
 | 
| -  CONVERT_ARG_HANDLE_CHECKED(FixedArray, literals, 0);
 | 
| -  CONVERT_SMI_ARG_CHECKED(literals_index, 1);
 | 
| -  CONVERT_ARG_HANDLE_CHECKED(FixedArray, elements, 2);
 | 
| -
 | 
| +static MaybeObject* CreateArrayLiteralImpl(Isolate* isolate,
 | 
| +                                           Handle<FixedArray> literals,
 | 
| +                                           int literals_index,
 | 
| +                                           Handle<FixedArray> elements,
 | 
| +                                           int flags) {
 | 
|    Handle<AllocationSite> site = GetLiteralAllocationSite(isolate, literals,
 | 
|        literals_index, elements);
 | 
|    RETURN_IF_EMPTY_HANDLE(isolate, site);
 | 
|  
 | 
| +  bool enable_mementos = (flags & ArrayLiteral::kDisableMementos) == 0;
 | 
| +  bool is_shallow = (flags & ArrayLiteral::kShallowElements) != 0;
 | 
| +
 | 
|    Handle<JSObject> boilerplate(JSObject::cast(site->transition_info()));
 | 
| -  AllocationSiteUsageContext usage_context(isolate, site, true);
 | 
| +  AllocationSiteUsageContext usage_context(isolate, site, enable_mementos);
 | 
|    usage_context.EnterNewScope();
 | 
| -  Handle<JSObject> copy = JSObject::DeepCopy(boilerplate, &usage_context);
 | 
| +  Handle<JSObject> copy = JSObject::DeepCopy(boilerplate, &usage_context,
 | 
| +                                             is_shallow);
 | 
|    usage_context.ExitScope(site, boilerplate);
 | 
|    RETURN_IF_EMPTY_HANDLE(isolate, copy);
 | 
|    return *copy;
 | 
|  }
 | 
|  
 | 
|  
 | 
| +RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateArrayLiteral) {
 | 
| +  HandleScope scope(isolate);
 | 
| +  ASSERT(args.length() == 4);
 | 
| +  CONVERT_ARG_HANDLE_CHECKED(FixedArray, literals, 0);
 | 
| +  CONVERT_SMI_ARG_CHECKED(literals_index, 1);
 | 
| +  CONVERT_ARG_HANDLE_CHECKED(FixedArray, elements, 2);
 | 
| +  CONVERT_SMI_ARG_CHECKED(flags, 3);
 | 
| +
 | 
| +  return CreateArrayLiteralImpl(isolate, literals, literals_index, elements,
 | 
| +                                flags);
 | 
| +}
 | 
| +
 | 
| +
 | 
| +RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateArrayLiteralStubBailout) {
 | 
| +  HandleScope scope(isolate);
 | 
| +  ASSERT(args.length() == 3);
 | 
| +  CONVERT_ARG_HANDLE_CHECKED(FixedArray, literals, 0);
 | 
| +  CONVERT_SMI_ARG_CHECKED(literals_index, 1);
 | 
| +  CONVERT_ARG_HANDLE_CHECKED(FixedArray, elements, 2);
 | 
| +
 | 
| +  return CreateArrayLiteralImpl(isolate, literals, literals_index, elements,
 | 
| +                                ArrayLiteral::kShallowElements);
 | 
| +}
 | 
| +
 | 
| +
 | 
|  RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateSymbol) {
 | 
|    HandleScope scope(isolate);
 | 
|    ASSERT(args.length() == 1);
 | 
| 
 |