Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 23b8c66eeaabbfbe28c2a4fd40ce4ca44478e5f4..98dfa4ae95b822a1acbfe4fd5067f02d139ab896 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -1526,24 +1526,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); |
} |