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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 if (arguments != NULL) { 278 if (arguments != NULL) {
279 // Function uses arguments object. 279 // Function uses arguments object.
280 Comment cmnt(masm_, "[ Allocate arguments object"); 280 Comment cmnt(masm_, "[ Allocate arguments object");
281 if (!function_in_register_a1) { 281 if (!function_in_register_a1) {
282 // Load this again, if it's used by the local context below. 282 // Load this again, if it's used by the local context below.
283 __ ld(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 283 __ ld(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
284 } 284 }
285 if (is_strict(language_mode()) || !has_simple_parameters()) { 285 if (is_strict(language_mode()) || !has_simple_parameters()) {
286 FastNewStrictArgumentsStub stub(isolate()); 286 FastNewStrictArgumentsStub stub(isolate());
287 __ CallStub(&stub); 287 __ CallStub(&stub);
288 } else if (literal()->has_duplicate_parameters()) {
289 __ Push(a1);
290 __ CallRuntime(Runtime::kNewSloppyArguments_Generic);
288 } else { 291 } else {
289 DCHECK(a1.is(ArgumentsAccessNewDescriptor::function())); 292 FastNewSloppyArgumentsStub stub(isolate());
290 // Receiver is just before the parameters on the caller's stack.
291 int num_parameters = info->scope()->num_parameters();
292 int offset = num_parameters * kPointerSize;
293 __ li(ArgumentsAccessNewDescriptor::parameter_count(),
294 Operand(Smi::FromInt(num_parameters)));
295 __ Daddu(ArgumentsAccessNewDescriptor::parameter_pointer(), fp,
296 Operand(StandardFrameConstants::kCallerSPOffset + offset));
297
298 // Arguments to ArgumentsAccessStub:
299 // function, parameter pointer, parameter count.
300 // The stub will rewrite parameter pointer and parameter count if the
301 // previous stack frame was an arguments adapter frame.
302 ArgumentsAccessStub::Type type = ArgumentsAccessStub::ComputeType(
303 literal()->has_duplicate_parameters());
304 ArgumentsAccessStub stub(isolate(), type);
305 __ CallStub(&stub); 293 __ CallStub(&stub);
306 } 294 }
307 295
308 SetVar(arguments, v0, a1, a2); 296 SetVar(arguments, v0, a1, a2);
309 } 297 }
310 298
311 if (FLAG_trace) { 299 if (FLAG_trace) {
312 __ CallRuntime(Runtime::kTraceEnter); 300 __ CallRuntime(Runtime::kTraceEnter);
313 } 301 }
314 302
(...skipping 4294 matching lines...) Expand 10 before | Expand all | Expand 10 after
4609 reinterpret_cast<uint64_t>( 4597 reinterpret_cast<uint64_t>(
4610 isolate->builtins()->OsrAfterStackCheck()->entry())); 4598 isolate->builtins()->OsrAfterStackCheck()->entry()));
4611 return OSR_AFTER_STACK_CHECK; 4599 return OSR_AFTER_STACK_CHECK;
4612 } 4600 }
4613 4601
4614 4602
4615 } // namespace internal 4603 } // namespace internal
4616 } // namespace v8 4604 } // namespace v8
4617 4605
4618 #endif // V8_TARGET_ARCH_MIPS64 4606 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698