Chromium Code Reviews| 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, |