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

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

Issue 1376413005: Revert of [heap] Prepare code for smaller large object allocation limit than max allocatable memory. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/code-stubs-hydrogen.cc ('k') | src/elements.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/compiler/access-builder.h" 6 #include "src/compiler/access-builder.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/js-typed-lowering.h" 8 #include "src/compiler/js-typed-lowering.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 DCHECK_EQ(IrOpcode::kJSCreateLiteralArray, node->opcode()); 1204 DCHECK_EQ(IrOpcode::kJSCreateLiteralArray, node->opcode());
1205 HeapObjectMatcher mconst(NodeProperties::GetValueInput(node, 2)); 1205 HeapObjectMatcher mconst(NodeProperties::GetValueInput(node, 2));
1206 int length = Handle<FixedArray>::cast(mconst.Value())->length(); 1206 int length = Handle<FixedArray>::cast(mconst.Value())->length();
1207 int flags = OpParameter<int>(node->op()); 1207 int flags = OpParameter<int>(node->op());
1208 1208
1209 // Use the FastCloneShallowArrayStub only for shallow boilerplates up to the 1209 // Use the FastCloneShallowArrayStub only for shallow boilerplates up to the
1210 // initial length limit for arrays with "fast" elements kind. 1210 // initial length limit for arrays with "fast" elements kind.
1211 // TODO(rossberg): Teach strong mode to FastCloneShallowArrayStub. 1211 // TODO(rossberg): Teach strong mode to FastCloneShallowArrayStub.
1212 if ((flags & ArrayLiteral::kShallowElements) != 0 && 1212 if ((flags & ArrayLiteral::kShallowElements) != 0 &&
1213 (flags & ArrayLiteral::kIsStrong) == 0 && 1213 (flags & ArrayLiteral::kIsStrong) == 0 &&
1214 length < JSArray::kInitialMaxFastElementArray) { 1214 length < JSObject::kInitialMaxFastElementArray) {
1215 Isolate* isolate = jsgraph()->isolate(); 1215 Isolate* isolate = jsgraph()->isolate();
1216 Callable callable = CodeFactory::FastCloneShallowArray(isolate); 1216 Callable callable = CodeFactory::FastCloneShallowArray(isolate);
1217 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 1217 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
1218 isolate, graph()->zone(), callable.descriptor(), 0, 1218 isolate, graph()->zone(), callable.descriptor(), 0,
1219 (OperatorProperties::GetFrameStateInputCount(node->op()) != 0) 1219 (OperatorProperties::GetFrameStateInputCount(node->op()) != 0)
1220 ? CallDescriptor::kNeedsFrameState 1220 ? CallDescriptor::kNeedsFrameState
1221 : CallDescriptor::kNoFlags); 1221 : CallDescriptor::kNoFlags);
1222 const Operator* new_op = common()->Call(desc); 1222 const Operator* new_op = common()->Call(desc);
1223 Node* stub_code = jsgraph()->HeapConstant(callable.code()); 1223 Node* stub_code = jsgraph()->HeapConstant(callable.code());
1224 node->InsertInput(graph()->zone(), 0, stub_code); 1224 node->InsertInput(graph()->zone(), 0, stub_code);
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 } 1845 }
1846 1846
1847 1847
1848 MachineOperatorBuilder* JSTypedLowering::machine() const { 1848 MachineOperatorBuilder* JSTypedLowering::machine() const {
1849 return jsgraph()->machine(); 1849 return jsgraph()->machine();
1850 } 1850 }
1851 1851
1852 } // namespace compiler 1852 } // namespace compiler
1853 } // namespace internal 1853 } // namespace internal
1854 } // namespace v8 1854 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698