| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index cd46747fb0234d67e31d39bf1fed1eefff7e1944..98bcd196e4981f70e11f4e1838211da4f17fc4f1 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -6758,16 +6758,32 @@ void HOptimizedGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
|
| pointer_size,
|
| DONT_TRACK_ALLOCATION_SITE);
|
| } else {
|
| + NoObservableSideEffectsScope no_effects(this);
|
| Handle<FixedArray> closure_literals(closure->literals(), isolate());
|
| + Handle<FixedArray> constant_properties = expr->constant_properties();
|
| + int literal_index = expr->literal_index();
|
| + int flags = expr->fast_elements()
|
| + ? ObjectLiteral::kFastElements : ObjectLiteral::kNoFlags;
|
| + flags |= expr->has_function()
|
| + ? ObjectLiteral::kHasFunction : ObjectLiteral::kNoFlags;
|
| +
|
| + AddInstruction(new(zone()) HPushArgument(AddInstruction(
|
| + new(zone()) HConstant(closure_literals, Representation::Tagged()))));
|
| + AddInstruction(new(zone()) HPushArgument(AddInstruction(
|
| + new(zone()) HConstant(literal_index, Representation::Tagged()))));
|
| + AddInstruction(new(zone()) HPushArgument(AddInstruction(
|
| + new(zone()) HConstant(constant_properties, Representation::Tagged()))));
|
| + AddInstruction(new(zone()) HPushArgument(AddInstruction(
|
| + new(zone()) HConstant(flags, Representation::Tagged()))));
|
| +
|
| + Runtime::FunctionId function_id =
|
| + (expr->depth() > 1 || expr->may_store_doubles())
|
| + ? Runtime::kCreateObjectLiteral : Runtime::kCreateObjectLiteralShallow;
|
| literal = AddInstruction(
|
| - new(zone()) HObjectLiteral(context,
|
| - expr->constant_properties(),
|
| - closure_literals,
|
| - expr->fast_elements(),
|
| - expr->literal_index(),
|
| - expr->depth(),
|
| - expr->may_store_doubles(),
|
| - expr->has_function()));
|
| + new(zone()) HCallRuntime(context,
|
| + isolate()->factory()->empty_string(),
|
| + Runtime::FunctionForId(function_id),
|
| + 4));
|
| }
|
|
|
| // The object is expected in the bailout environment during computation
|
|
|