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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler/js-create-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2706 matching lines...) Expand 10 before | Expand all | Expand 10 after
2717 Node* closure = assembler.Parameter(Descriptor::kClosure); 2717 Node* closure = assembler.Parameter(Descriptor::kClosure);
2718 Node* literal_index = assembler.Parameter(Descriptor::kLiteralIndex); 2718 Node* literal_index = assembler.Parameter(Descriptor::kLiteralIndex);
2719 Node* pattern = assembler.Parameter(Descriptor::kPattern); 2719 Node* pattern = assembler.Parameter(Descriptor::kPattern);
2720 Node* flags = assembler.Parameter(Descriptor::kFlags); 2720 Node* flags = assembler.Parameter(Descriptor::kFlags);
2721 Node* context = assembler.Parameter(Descriptor::kContext); 2721 Node* context = assembler.Parameter(Descriptor::kContext);
2722 2722
2723 assembler.Return( 2723 assembler.Return(
2724 Generate(&assembler, closure, literal_index, pattern, flags, context)); 2724 Generate(&assembler, closure, literal_index, pattern, flags, context));
2725 } 2725 }
2726 2726
2727 // static
2728 bool FastCloneShallowArrayStub::IsSupported(ArrayLiteral* expr) {
2729 return expr->depth() <= 1 &&
2730 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
2731 }
2732
2727 namespace { 2733 namespace {
2728 2734
2729 compiler::Node* NonEmptyShallowClone(CodeStubAssembler* assembler, 2735 compiler::Node* NonEmptyShallowClone(CodeStubAssembler* assembler,
2730 compiler::Node* boilerplate, 2736 compiler::Node* boilerplate,
2731 compiler::Node* boilerplate_map, 2737 compiler::Node* boilerplate_map,
2732 compiler::Node* boilerplate_elements, 2738 compiler::Node* boilerplate_elements,
2733 compiler::Node* allocation_site, 2739 compiler::Node* allocation_site,
2734 compiler::Node* capacity, 2740 compiler::Node* capacity,
2735 ElementsKind kind) { 2741 ElementsKind kind) {
2736 typedef compiler::Node Node; 2742 typedef compiler::Node Node;
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
3217 } 3223 }
3218 3224
3219 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) 3225 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate)
3220 : PlatformCodeStub(isolate) {} 3226 : PlatformCodeStub(isolate) {}
3221 3227
3222 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate) 3228 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate)
3223 : PlatformCodeStub(isolate) {} 3229 : PlatformCodeStub(isolate) {}
3224 3230
3225 } // namespace internal 3231 } // namespace internal
3226 } // namespace v8 3232 } // namespace v8
OLDNEW
« 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