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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 1734243004: Remove strong mode support from materialized literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Test expectations. Created 4 years, 10 months 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/ast/ast.h ('k') | src/crankshaft/hydrogen.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) { 642 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) {
643 CreateLiteralParameters const& p = CreateLiteralParametersOf(node->op()); 643 CreateLiteralParameters const& p = CreateLiteralParametersOf(node->op());
644 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 644 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
645 int const length = Handle<FixedArray>::cast(p.constant())->length(); 645 int const length = Handle<FixedArray>::cast(p.constant())->length();
646 node->InsertInput(zone(), 1, jsgraph()->SmiConstant(p.index())); 646 node->InsertInput(zone(), 1, jsgraph()->SmiConstant(p.index()));
647 node->InsertInput(zone(), 2, jsgraph()->HeapConstant(p.constant())); 647 node->InsertInput(zone(), 2, jsgraph()->HeapConstant(p.constant()));
648 648
649 // Use the FastCloneShallowArrayStub only for shallow boilerplates up to the 649 // Use the FastCloneShallowArrayStub only for shallow boilerplates up to the
650 // initial length limit for arrays with "fast" elements kind. 650 // initial length limit for arrays with "fast" elements kind.
651 if ((p.flags() & ArrayLiteral::kShallowElements) != 0 && 651 if ((p.flags() & ArrayLiteral::kShallowElements) != 0 &&
652 (p.flags() & ArrayLiteral::kIsStrong) == 0 &&
653 length < JSArray::kInitialMaxFastElementArray) { 652 length < JSArray::kInitialMaxFastElementArray) {
654 Callable callable = CodeFactory::FastCloneShallowArray(isolate()); 653 Callable callable = CodeFactory::FastCloneShallowArray(isolate());
655 ReplaceWithStubCall(node, callable, flags); 654 ReplaceWithStubCall(node, callable, flags);
656 } else { 655 } else {
657 node->InsertInput(zone(), 3, jsgraph()->SmiConstant(p.flags())); 656 node->InsertInput(zone(), 3, jsgraph()->SmiConstant(p.flags()));
658 ReplaceWithRuntimeCall(node, Runtime::kCreateArrayLiteral); 657 ReplaceWithRuntimeCall(node, Runtime::kCreateArrayLiteral);
659 } 658 }
660 } 659 }
661 660
662 661
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 } 862 }
864 863
865 864
866 MachineOperatorBuilder* JSGenericLowering::machine() const { 865 MachineOperatorBuilder* JSGenericLowering::machine() const {
867 return jsgraph()->machine(); 866 return jsgraph()->machine();
868 } 867 }
869 868
870 } // namespace compiler 869 } // namespace compiler
871 } // namespace internal 870 } // namespace internal
872 } // namespace v8 871 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698