Index: src/full-codegen/full-codegen.cc |
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc |
index 20eb47e05652d3d40e9d8700d296a35b459b5d00..ca9bbb4faff383b22668faa0fcf587c7834d118f 100644 |
--- a/src/full-codegen/full-codegen.cc |
+++ b/src/full-codegen/full-codegen.cc |
@@ -176,15 +176,13 @@ void FullCodeGenerator::PopulateTypeFeedbackInfo(Handle<Code> code) { |
bool FullCodeGenerator::MustCreateObjectLiteralWithRuntime( |
ObjectLiteral* expr) const { |
- return masm()->serializer_enabled() || |
- !FastCloneShallowObjectStub::IsSupported(expr); |
+ return masm()->serializer_enabled() || !expr->IsFastCloningSupported(); |
} |
bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime( |
ArrayLiteral* expr) const { |
- return expr->depth() > 1 || |
- expr->values()->length() > JSArray::kInitialMaxFastElementArray; |
+ return !expr->IsFastCloningSupported(); |
} |
void FullCodeGenerator::Initialize(uintptr_t stack_limit) { |