| Index: src/mips/full-codegen-mips.cc
|
| diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
|
| index 4318b7a428119ef3dbc5cb6144d79e51c4ac86a7..f38a7b4572ce68b6aa05bbb4d6c8845a181de717 100644
|
| --- a/src/mips/full-codegen-mips.cc
|
| +++ b/src/mips/full-codegen-mips.cc
|
| @@ -1424,10 +1424,11 @@ void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
|
|
|
| void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
| Comment cmnt(masm_, "[ ObjectLiteral");
|
| + Handle<FixedArray> constant_properties = expr->constant_properties();
|
| __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
|
| __ lw(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset));
|
| __ li(a2, Operand(Smi::FromInt(expr->literal_index())));
|
| - __ li(a1, Operand(expr->constant_properties()));
|
| + __ li(a1, Operand(constant_properties));
|
| int flags = expr->fast_elements()
|
| ? ObjectLiteral::kFastElements
|
| : ObjectLiteral::kNoFlags;
|
| @@ -1436,10 +1437,15 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
| : ObjectLiteral::kNoFlags;
|
| __ li(a0, Operand(Smi::FromInt(flags)));
|
| __ Push(a3, a2, a1, a0);
|
| + 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
|
|
|