| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index 0318103819a3ca8fc7f185528a0593f8959cc6e3..42561d39383cb32320f547a4680795adf36c752e 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -1527,24 +1527,34 @@ void FullCodeGenerator::EmitAccessor(Expression* expression) {
|
| void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
| Comment cmnt(masm_, "[ ObjectLiteral");
|
| Handle<FixedArray> constant_properties = expr->constant_properties();
|
| - __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
|
| - __ push(FieldOperand(edi, JSFunction::kLiteralsOffset));
|
| - __ push(Immediate(Smi::FromInt(expr->literal_index())));
|
| - __ push(Immediate(constant_properties));
|
| int flags = expr->fast_elements()
|
| ? ObjectLiteral::kFastElements
|
| : ObjectLiteral::kNoFlags;
|
| flags |= expr->has_function()
|
| ? ObjectLiteral::kHasFunction
|
| : ObjectLiteral::kNoFlags;
|
| - __ push(Immediate(Smi::FromInt(flags)));
|
| int properties_count = constant_properties->length() / 2;
|
| if (expr->depth() > 1) {
|
| + __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
|
| + __ push(FieldOperand(edi, JSFunction::kLiteralsOffset));
|
| + __ push(Immediate(Smi::FromInt(expr->literal_index())));
|
| + __ push(Immediate(constant_properties));
|
| + __ push(Immediate(Smi::FromInt(flags)));
|
| __ CallRuntime(Runtime::kCreateObjectLiteral, 4);
|
| - } else if (flags != ObjectLiteral::kFastElements ||
|
| + } else if (Serializer::enabled() || flags != ObjectLiteral::kFastElements ||
|
| properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) {
|
| + __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
|
| + __ push(FieldOperand(edi, JSFunction::kLiteralsOffset));
|
| + __ push(Immediate(Smi::FromInt(expr->literal_index())));
|
| + __ push(Immediate(constant_properties));
|
| + __ push(Immediate(Smi::FromInt(flags)));
|
| __ CallRuntime(Runtime::kCreateObjectLiteralShallow, 4);
|
| } else {
|
| + __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
|
| + __ mov(eax, FieldOperand(edi, JSFunction::kLiteralsOffset));
|
| + __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index())));
|
| + __ mov(ecx, Immediate(constant_properties));
|
| + __ mov(edx, Immediate(Smi::FromInt(flags)));
|
| FastCloneShallowObjectStub stub(properties_count);
|
| __ CallStub(&stub);
|
| }
|
|
|