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

Unified Diff: src/code-stubs.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
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler/js-create-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index c97ba3db2d59ed3458505b1f359f3e8432db8a34..a7b68a0aacf99ad6674a52bfbe33d5772b88b380 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -2724,6 +2724,12 @@ void FastCloneRegExpStub::GenerateAssembly(
Generate(&assembler, closure, literal_index, pattern, flags, context));
}
+// static
+bool FastCloneShallowArrayStub::IsSupported(ArrayLiteral* expr) {
+ return expr->depth() <= 1 &&
+ expr->values()->length() <= kMaximumClonedElements;
Camillo Bruni 2016/12/14 10:59:08 How about putting this on the ArrayLiteral node in
Michael Starzinger 2016/12/14 14:01:03 Done. Good idea, applied it to ArrayLiteral as wel
+}
+
namespace {
compiler::Node* NonEmptyShallowClone(CodeStubAssembler* assembler,
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler/js-create-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698