Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: src/full-codegen/full-codegen.cc

Issue 2570843002: Fix usage of literal cloning for large double arrays. (Closed)
Patch Set: Add missing flag. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..444dd8ec25d86f6b2b6d6a8487fa6d733fd25816 100644
--- a/src/full-codegen/full-codegen.cc
+++ b/src/full-codegen/full-codegen.cc
@@ -183,8 +183,7 @@ bool FullCodeGenerator::MustCreateObjectLiteralWithRuntime(
bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime(
ArrayLiteral* expr) const {
- return expr->depth() > 1 ||
- expr->values()->length() > JSArray::kInitialMaxFastElementArray;
+ return !FastCloneShallowArrayStub::IsSupported(expr);
}
void FullCodeGenerator::Initialize(uintptr_t stack_limit) {

Powered by Google App Engine
This is Rietveld 408576698