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

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

Issue 1556913002: Use register arguments for RestParamAccessStub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 4 years, 11 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
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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 // Possibly allocate RestParameters 272 // Possibly allocate RestParameters
273 int rest_index; 273 int rest_index;
274 Variable* rest_param = scope()->rest_parameter(&rest_index); 274 Variable* rest_param = scope()->rest_parameter(&rest_index);
275 if (rest_param) { 275 if (rest_param) {
276 Comment cmnt(masm_, "[ Allocate rest parameter array"); 276 Comment cmnt(masm_, "[ Allocate rest parameter array");
277 277
278 int num_parameters = info->scope()->num_parameters(); 278 int num_parameters = info->scope()->num_parameters();
279 int offset = num_parameters * kPointerSize; 279 int offset = num_parameters * kPointerSize;
280 280
281 __ Addu(a3, fp, Operand(StandardFrameConstants::kCallerSPOffset + offset)); 281 __ li(RestParamAccessDescriptor::parameter_count(),
282 __ li(a2, Operand(Smi::FromInt(num_parameters))); 282 Operand(Smi::FromInt(num_parameters)));
283 __ li(a1, Operand(Smi::FromInt(rest_index))); 283 __ Addu(RestParamAccessDescriptor::parameter_pointer(), fp,
284 __ li(a0, Operand(Smi::FromInt(language_mode()))); 284 Operand(StandardFrameConstants::kCallerSPOffset + offset));
285 __ Push(a3, a2, a1, a0); 285 __ li(RestParamAccessDescriptor::rest_parameter_index(),
286 Operand(Smi::FromInt(rest_index)));
287 __ li(RestParamAccessDescriptor::language_mode(),
288 Operand(Smi::FromInt(language_mode())));
289 DCHECK(a1.is(RestParamAccessDescriptor::rest_parameter_index()));
286 function_in_register_a1 = false; 290 function_in_register_a1 = false;
287 291
288 RestParamAccessStub stub(isolate()); 292 RestParamAccessStub stub(isolate());
289 __ CallStub(&stub); 293 __ CallStub(&stub);
290 294
291 SetVar(rest_param, v0, a1, a2); 295 SetVar(rest_param, v0, a1, a2);
292 } 296 }
293 297
294 Variable* arguments = scope()->arguments(); 298 Variable* arguments = scope()->arguments();
295 if (arguments != NULL) { 299 if (arguments != NULL) {
(...skipping 4569 matching lines...) Expand 10 before | Expand all | Expand 10 after
4865 reinterpret_cast<uint32_t>( 4869 reinterpret_cast<uint32_t>(
4866 isolate->builtins()->OsrAfterStackCheck()->entry())); 4870 isolate->builtins()->OsrAfterStackCheck()->entry()));
4867 return OSR_AFTER_STACK_CHECK; 4871 return OSR_AFTER_STACK_CHECK;
4868 } 4872 }
4869 4873
4870 4874
4871 } // namespace internal 4875 } // namespace internal
4872 } // namespace v8 4876 } // namespace v8
4873 4877
4874 #endif // V8_TARGET_ARCH_MIPS 4878 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698