Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 9ccae5a0ad80325e5f7090c2f28425f9d5a59f1b..4db8e46537618361089fc28877d80a5868cfd965 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -1580,7 +1580,7 @@ void FullCodeGenerator::EmitAccessor(Expression* expression) { |
void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
Comment cmnt(masm_, "[ ObjectLiteral"); |
Handle<FixedArray> constant_properties = expr->constant_properties(); |
- __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
+ __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
__ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); |
__ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); |
__ mov(r1, Operand(constant_properties)); |
@@ -1591,12 +1591,13 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
? ObjectLiteral::kHasFunction |
: ObjectLiteral::kNoFlags; |
__ mov(r0, Operand(Smi::FromInt(flags))); |
- __ Push(r3, r2, r1, r0); |
int properties_count = constant_properties->length() / 2; |
if (expr->depth() > 1) { |
+ __ Push(r3, r2, r1, r0); |
__ CallRuntime(Runtime::kCreateObjectLiteral, 4); |
- } else if (flags != ObjectLiteral::kFastElements || |
+ } else if (Serializer::enabled() || flags != ObjectLiteral::kFastElements || |
properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { |
+ __ Push(r3, r2, r1, r0); |
__ CallRuntime(Runtime::kCreateObjectLiteralShallow, 4); |
} else { |
FastCloneShallowObjectStub stub(properties_count); |