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

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

Issue 2054853002: Fix arguments object stubs for large arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Port to most architectures. Created 4 years, 6 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/arm64/code-stubs-arm64.cc ('k') | src/ia32/code-stubs-ia32.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/compiler/js-create-lowering.h" 5 #include "src/compiler/js-create-lowering.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/compilation-dependencies.h" 9 #include "src/compilation-dependencies.h"
10 #include "src/compiler/access-builder.h" 10 #include "src/compiler/access-builder.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 node->InsertInput(graph()->zone(), 0, stub_code); 304 node->InsertInput(graph()->zone(), 0, stub_code);
305 node->RemoveInput(3); // Remove the frame state. 305 node->RemoveInput(3); // Remove the frame state.
306 NodeProperties::ChangeOp(node, new_op); 306 NodeProperties::ChangeOp(node, new_op);
307 return Changed(node); 307 return Changed(node);
308 } 308 }
309 case CreateArgumentsType::kUnmappedArguments: { 309 case CreateArgumentsType::kUnmappedArguments: {
310 Callable callable = CodeFactory::FastNewStrictArguments(isolate()); 310 Callable callable = CodeFactory::FastNewStrictArguments(isolate());
311 Operator::Properties properties = node->op()->properties(); 311 Operator::Properties properties = node->op()->properties();
312 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 312 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
313 isolate(), graph()->zone(), callable.descriptor(), 0, 313 isolate(), graph()->zone(), callable.descriptor(), 0,
314 CallDescriptor::kNoFlags, properties); 314 CallDescriptor::kNeedsFrameState, properties);
315 const Operator* new_op = common()->Call(desc); 315 const Operator* new_op = common()->Call(desc);
316 Node* stub_code = jsgraph()->HeapConstant(callable.code()); 316 Node* stub_code = jsgraph()->HeapConstant(callable.code());
317 node->InsertInput(graph()->zone(), 0, stub_code); 317 node->InsertInput(graph()->zone(), 0, stub_code);
318 node->RemoveInput(3); // Remove the frame state.
319 NodeProperties::ChangeOp(node, new_op); 318 NodeProperties::ChangeOp(node, new_op);
320 return Changed(node); 319 return Changed(node);
321 } 320 }
322 case CreateArgumentsType::kRestParameter: { 321 case CreateArgumentsType::kRestParameter: {
323 Callable callable = CodeFactory::FastNewRestParameter(isolate()); 322 Callable callable = CodeFactory::FastNewRestParameter(isolate());
324 Operator::Properties properties = node->op()->properties(); 323 Operator::Properties properties = node->op()->properties();
325 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 324 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
326 isolate(), graph()->zone(), callable.descriptor(), 0, 325 isolate(), graph()->zone(), callable.descriptor(), 0,
327 CallDescriptor::kNoFlags, properties); 326 CallDescriptor::kNeedsFrameState, properties);
328 const Operator* new_op = common()->Call(desc); 327 const Operator* new_op = common()->Call(desc);
329 Node* stub_code = jsgraph()->HeapConstant(callable.code()); 328 Node* stub_code = jsgraph()->HeapConstant(callable.code());
330 node->InsertInput(graph()->zone(), 0, stub_code); 329 node->InsertInput(graph()->zone(), 0, stub_code);
331 node->RemoveInput(3); // Remove the frame state.
332 NodeProperties::ChangeOp(node, new_op); 330 NodeProperties::ChangeOp(node, new_op);
333 return Changed(node); 331 return Changed(node);
334 } 332 }
335 } 333 }
336 UNREACHABLE(); 334 UNREACHABLE();
337 } else if (outer_state->opcode() == IrOpcode::kFrameState) { 335 } else if (outer_state->opcode() == IrOpcode::kFrameState) {
338 // Use inline allocation for all mapped arguments objects within inlined 336 // Use inline allocation for all mapped arguments objects within inlined
339 // (i.e. non-outermost) frames, independent of the object size. 337 // (i.e. non-outermost) frames, independent of the object size.
340 if (type == CreateArgumentsType::kMappedArguments) { 338 if (type == CreateArgumentsType::kMappedArguments) {
341 Handle<SharedFunctionInfo> shared; 339 Handle<SharedFunctionInfo> shared;
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 return jsgraph()->simplified(); 1125 return jsgraph()->simplified();
1128 } 1126 }
1129 1127
1130 MachineOperatorBuilder* JSCreateLowering::machine() const { 1128 MachineOperatorBuilder* JSCreateLowering::machine() const {
1131 return jsgraph()->machine(); 1129 return jsgraph()->machine();
1132 } 1130 }
1133 1131
1134 } // namespace compiler 1132 } // namespace compiler
1135 } // namespace internal 1133 } // namespace internal
1136 } // namespace v8 1134 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698