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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 1695633003: [runtime] Turn ArgumentAccessStub into FastNewSloppyArgumentsStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix MIPS dead code 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/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 if (arguments != NULL) { 274 if (arguments != NULL) {
275 // Function uses arguments object. 275 // Function uses arguments object.
276 Comment cmnt(masm_, "[ Allocate arguments object"); 276 Comment cmnt(masm_, "[ Allocate arguments object");
277 if (!function_in_register_x1) { 277 if (!function_in_register_x1) {
278 // Load this again, if it's used by the local context below. 278 // Load this again, if it's used by the local context below.
279 __ Ldr(x1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 279 __ Ldr(x1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
280 } 280 }
281 if (is_strict(language_mode()) || !has_simple_parameters()) { 281 if (is_strict(language_mode()) || !has_simple_parameters()) {
282 FastNewStrictArgumentsStub stub(isolate()); 282 FastNewStrictArgumentsStub stub(isolate());
283 __ CallStub(&stub); 283 __ CallStub(&stub);
284 } else if (literal()->has_duplicate_parameters()) {
285 __ Push(x1);
286 __ CallRuntime(Runtime::kNewSloppyArguments_Generic);
284 } else { 287 } else {
285 DCHECK(x1.is(ArgumentsAccessNewDescriptor::function())); 288 FastNewSloppyArgumentsStub stub(isolate());
286 // Receiver is just before the parameters on the caller's stack.
287 int num_parameters = info->scope()->num_parameters();
288 int offset = num_parameters * kPointerSize;
289 __ Mov(ArgumentsAccessNewDescriptor::parameter_count(),
290 Smi::FromInt(num_parameters));
291 __ Add(ArgumentsAccessNewDescriptor::parameter_pointer(), fp,
292 StandardFrameConstants::kCallerSPOffset + offset);
293
294 // Arguments to ArgumentsAccessStub:
295 // function, parameter pointer, parameter count.
296 // The stub will rewrite parameter pointer and parameter count if the
297 // previous stack frame was an arguments adapter frame.
298 ArgumentsAccessStub::Type type = ArgumentsAccessStub::ComputeType(
299 literal()->has_duplicate_parameters());
300 ArgumentsAccessStub stub(isolate(), type);
301 __ CallStub(&stub); 289 __ CallStub(&stub);
302 } 290 }
303 291
304 SetVar(arguments, x0, x1, x2); 292 SetVar(arguments, x0, x1, x2);
305 } 293 }
306 294
307 if (FLAG_trace) { 295 if (FLAG_trace) {
308 __ CallRuntime(Runtime::kTraceEnter); 296 __ CallRuntime(Runtime::kTraceEnter);
309 } 297 }
310 298
(...skipping 4324 matching lines...) Expand 10 before | Expand all | Expand 10 after
4635 } 4623 }
4636 4624
4637 return INTERRUPT; 4625 return INTERRUPT;
4638 } 4626 }
4639 4627
4640 4628
4641 } // namespace internal 4629 } // namespace internal
4642 } // namespace v8 4630 } // namespace v8
4643 4631
4644 #endif // V8_TARGET_ARCH_ARM64 4632 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698