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

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

Issue 1537683002: Partial revert of rest parameter desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test failures. Created 5 years 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 SetVar(this_function_var, a1, a0, a2); 261 SetVar(this_function_var, a1, a0, a2);
262 } 262 }
263 263
264 Variable* new_target_var = scope()->new_target_var(); 264 Variable* new_target_var = scope()->new_target_var();
265 if (new_target_var != nullptr) { 265 if (new_target_var != nullptr) {
266 Comment cmnt(masm_, "[ new.target"); 266 Comment cmnt(masm_, "[ new.target");
267 SetVar(new_target_var, a3, a0, a2); 267 SetVar(new_target_var, a3, a0, a2);
268 } 268 }
269 269
270 // Possibly allocate RestParameters
271 int rest_index;
272 Variable* rest_param = scope()->rest_parameter(&rest_index);
273 if (rest_param) {
274 Comment cmnt(masm_, "[ Allocate rest parameter array");
275
276 int num_parameters = info->scope()->num_parameters();
277 int offset = num_parameters * kPointerSize;
278
279 __ Daddu(a3, fp, Operand(StandardFrameConstants::kCallerSPOffset + offset));
280 __ li(a2, Operand(Smi::FromInt(num_parameters)));
281 __ li(a1, Operand(Smi::FromInt(rest_index)));
282 __ li(a0, Operand(Smi::FromInt(language_mode())));
283 __ Push(a3, a2, a1, a0);
284 function_in_register_a1 = false;
285
286 RestParamAccessStub stub(isolate());
287 __ CallStub(&stub);
288
289 SetVar(rest_param, v0, a1, a2);
290 }
291
270 Variable* arguments = scope()->arguments(); 292 Variable* arguments = scope()->arguments();
271 if (arguments != NULL) { 293 if (arguments != NULL) {
272 // Function uses arguments object. 294 // Function uses arguments object.
273 Comment cmnt(masm_, "[ Allocate arguments object"); 295 Comment cmnt(masm_, "[ Allocate arguments object");
274 DCHECK(a1.is(ArgumentsAccessNewDescriptor::function())); 296 DCHECK(a1.is(ArgumentsAccessNewDescriptor::function()));
275 if (!function_in_register_a1) { 297 if (!function_in_register_a1) {
276 // Load this again, if it's used by the local context below. 298 // Load this again, if it's used by the local context below.
277 __ ld(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 299 __ ld(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
278 } 300 }
279 // Receiver is just before the parameters on the caller's stack. 301 // Receiver is just before the parameters on the caller's stack.
(...skipping 4580 matching lines...) Expand 10 before | Expand all | Expand 10 after
4860 reinterpret_cast<uint64_t>( 4882 reinterpret_cast<uint64_t>(
4861 isolate->builtins()->OsrAfterStackCheck()->entry())); 4883 isolate->builtins()->OsrAfterStackCheck()->entry()));
4862 return OSR_AFTER_STACK_CHECK; 4884 return OSR_AFTER_STACK_CHECK;
4863 } 4885 }
4864 4886
4865 4887
4866 } // namespace internal 4888 } // namespace internal
4867 } // namespace v8 4889 } // namespace v8
4868 4890
4869 #endif // V8_TARGET_ARCH_MIPS64 4891 #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