| Index: src/arm/full-codegen-arm.cc
|
| diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
|
| index fcc0bd581363acc1be90a746c0af3492b7114f13..62fad3e5d3aa6b3d39d74f78551532ce9e9f711f 100644
|
| --- a/src/arm/full-codegen-arm.cc
|
| +++ b/src/arm/full-codegen-arm.cc
|
| @@ -1416,10 +1416,11 @@ void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
|
|
|
| void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
| Comment cmnt(masm_, "[ ObjectLiteral");
|
| + Handle<FixedArray> constant_properties = expr->constant_properties();
|
| __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
|
| __ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset));
|
| __ mov(r2, Operand(Smi::FromInt(expr->literal_index())));
|
| - __ mov(r1, Operand(expr->constant_properties()));
|
| + __ mov(r1, Operand(constant_properties));
|
| int flags = expr->fast_elements()
|
| ? ObjectLiteral::kFastElements
|
| : ObjectLiteral::kNoFlags;
|
| @@ -1428,10 +1429,15 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
| : ObjectLiteral::kNoFlags;
|
| __ mov(r0, Operand(Smi::FromInt(flags)));
|
| __ Push(r3, r2, r1, r0);
|
| + int properties_count = constant_properties->length() / 2;
|
| if (expr->depth() > 1) {
|
| __ CallRuntime(Runtime::kCreateObjectLiteral, 4);
|
| - } else {
|
| + } else if (flags != ObjectLiteral::kFastElements ||
|
| + properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) {
|
| __ CallRuntime(Runtime::kCreateObjectLiteralShallow, 4);
|
| + } else {
|
| + FastCloneShallowObjectStub stub(properties_count);
|
| + __ CallStub(&stub);
|
| }
|
|
|
| // If result_saved is true the result is on top of the stack. If
|
|
|