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

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

Issue 1701653002: Revert of [runtime] Turn ArgumentAccessStub into FastNewSloppyArgumentsStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/compiler/js-create-lowering.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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 #if V8_TARGET_ARCH_ARM 5 #if V8_TARGET_ARCH_ARM
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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 if (arguments != NULL) { 270 if (arguments != NULL) {
271 // Function uses arguments object. 271 // Function uses arguments object.
272 Comment cmnt(masm_, "[ Allocate arguments object"); 272 Comment cmnt(masm_, "[ Allocate arguments object");
273 if (!function_in_register_r1) { 273 if (!function_in_register_r1) {
274 // Load this again, if it's used by the local context below. 274 // Load this again, if it's used by the local context below.
275 __ ldr(r1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 275 __ ldr(r1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
276 } 276 }
277 if (is_strict(language_mode()) || !has_simple_parameters()) { 277 if (is_strict(language_mode()) || !has_simple_parameters()) {
278 FastNewStrictArgumentsStub stub(isolate()); 278 FastNewStrictArgumentsStub stub(isolate());
279 __ CallStub(&stub); 279 __ CallStub(&stub);
280 } else if (literal()->has_duplicate_parameters()) {
281 __ Push(r1);
282 __ CallRuntime(Runtime::kNewSloppyArguments_Generic);
283 } else { 280 } else {
284 FastNewSloppyArgumentsStub stub(isolate()); 281 DCHECK(r1.is(ArgumentsAccessNewDescriptor::function()));
282 // Receiver is just before the parameters on the caller's stack.
283 int num_parameters = info->scope()->num_parameters();
284 int offset = num_parameters * kPointerSize;
285 __ mov(ArgumentsAccessNewDescriptor::parameter_count(),
286 Operand(Smi::FromInt(num_parameters)));
287 __ add(ArgumentsAccessNewDescriptor::parameter_pointer(), fp,
288 Operand(StandardFrameConstants::kCallerSPOffset + offset));
289
290 // Arguments to ArgumentsAccessStub:
291 // function, parameter pointer, parameter count.
292 // The stub will rewrite parameter pointer and parameter count if the
293 // previous stack frame was an arguments adapter frame.
294 ArgumentsAccessStub::Type type = ArgumentsAccessStub::ComputeType(
295 literal()->has_duplicate_parameters());
296 ArgumentsAccessStub stub(isolate(), type);
285 __ CallStub(&stub); 297 __ CallStub(&stub);
286 } 298 }
287 299
288 SetVar(arguments, r0, r1, r2); 300 SetVar(arguments, r0, r1, r2);
289 } 301 }
290 302
291 if (FLAG_trace) { 303 if (FLAG_trace) {
292 __ CallRuntime(Runtime::kTraceEnter); 304 __ CallRuntime(Runtime::kTraceEnter);
293 } 305 }
294 306
(...skipping 4351 matching lines...) Expand 10 before | Expand all | Expand 10 after
4646 DCHECK(interrupt_address == 4658 DCHECK(interrupt_address ==
4647 isolate->builtins()->OsrAfterStackCheck()->entry()); 4659 isolate->builtins()->OsrAfterStackCheck()->entry());
4648 return OSR_AFTER_STACK_CHECK; 4660 return OSR_AFTER_STACK_CHECK;
4649 } 4661 }
4650 4662
4651 4663
4652 } // namespace internal 4664 } // namespace internal
4653 } // namespace v8 4665 } // namespace v8
4654 4666
4655 #endif // V8_TARGET_ARCH_ARM 4667 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/compiler/js-create-lowering.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698