| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index c1ef22edcf867bcb3e418bee23ec66fd792c5524..c178b7f852085759bc5dd26ee9cc107d2e8175d0 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -1374,10 +1374,11 @@ void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
|
|
|
| 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(expr->constant_properties()));
|
| + __ push(Immediate(constant_properties));
|
| int flags = expr->fast_elements()
|
| ? ObjectLiteral::kFastElements
|
| : ObjectLiteral::kNoFlags;
|
| @@ -1385,10 +1386,15 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
| ? ObjectLiteral::kHasFunction
|
| : ObjectLiteral::kNoFlags;
|
| __ push(Immediate(Smi::FromInt(flags)));
|
| + 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
|
|
|