Chromium Code Reviews| Index: src/full-codegen.cc |
| diff --git a/src/full-codegen.cc b/src/full-codegen.cc |
| index 6acfb97de3a5321b91d9d22a3c0d2de4f2f9535b..b470a7a3e4655c892084c26e957c10fba71b820b 100644 |
| --- a/src/full-codegen.cc |
| +++ b/src/full-codegen.cc |
| @@ -423,10 +423,9 @@ bool FullCodeGenerator::MustCreateObjectLiteralWithRuntime( |
| // FastCloneShallowObjectStub doesn't copy elements, and object literals don't |
| // support copy-on-write (COW) elements for now. |
| // TODO(mvstanton): make object literals support COW elements. |
| - return expr->may_store_doubles() || expr->depth() > 1 || |
| - masm()->serializer_enabled() || |
| + return masm()->serializer_enabled() || |
| + expr->ComputeFlags() != ObjectLiteral::kShallowProperties || |
|
titzer
2015/04/21 14:02:26
Is ComputeFlags() expensive enough to need a cache
Michael Starzinger
2015/04/21 14:35:41
Done.
|
| expr->ComputeFlags() != ObjectLiteral::kFastElements || |
| - expr->has_elements() || |
| expr->properties_count() > |
| FastCloneShallowObjectStub::kMaximumClonedProperties; |
| } |