OLD | NEW |
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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 269 |
270 // Possibly allocate RestParameters | 270 // Possibly allocate RestParameters |
271 int rest_index; | 271 int rest_index; |
272 Variable* rest_param = scope()->rest_parameter(&rest_index); | 272 Variable* rest_param = scope()->rest_parameter(&rest_index); |
273 if (rest_param) { | 273 if (rest_param) { |
274 Comment cmnt(masm_, "[ Allocate rest parameter array"); | 274 Comment cmnt(masm_, "[ Allocate rest parameter array"); |
275 | 275 |
276 int num_parameters = info->scope()->num_parameters(); | 276 int num_parameters = info->scope()->num_parameters(); |
277 int offset = num_parameters * kPointerSize; | 277 int offset = num_parameters * kPointerSize; |
278 | 278 |
279 __ Daddu(a3, fp, Operand(StandardFrameConstants::kCallerSPOffset + offset)); | 279 __ li(RestParamAccessDescriptor::parameter_count(), |
280 __ li(a2, Operand(Smi::FromInt(num_parameters))); | 280 Operand(Smi::FromInt(num_parameters))); |
281 __ li(a1, Operand(Smi::FromInt(rest_index))); | 281 __ Daddu(RestParamAccessDescriptor::parameter_pointer(), fp, |
282 __ li(a0, Operand(Smi::FromInt(language_mode()))); | 282 Operand(StandardFrameConstants::kCallerSPOffset + offset)); |
283 __ Push(a3, a2, a1, a0); | 283 __ li(RestParamAccessDescriptor::rest_parameter_index(), |
| 284 Operand(Smi::FromInt(rest_index))); |
| 285 __ li(RestParamAccessDescriptor::language_mode(), |
| 286 Operand(Smi::FromInt(language_mode()))); |
| 287 DCHECK(a1.is(RestParamAccessDescriptor::language_mode())); |
284 function_in_register_a1 = false; | 288 function_in_register_a1 = false; |
285 | 289 |
286 RestParamAccessStub stub(isolate()); | 290 RestParamAccessStub stub(isolate()); |
287 __ CallStub(&stub); | 291 __ CallStub(&stub); |
288 | 292 |
289 SetVar(rest_param, v0, a1, a2); | 293 SetVar(rest_param, v0, a1, a2); |
290 } | 294 } |
291 | 295 |
292 Variable* arguments = scope()->arguments(); | 296 Variable* arguments = scope()->arguments(); |
293 if (arguments != NULL) { | 297 if (arguments != NULL) { |
(...skipping 4585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4879 reinterpret_cast<uint64_t>( | 4883 reinterpret_cast<uint64_t>( |
4880 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4884 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4881 return OSR_AFTER_STACK_CHECK; | 4885 return OSR_AFTER_STACK_CHECK; |
4882 } | 4886 } |
4883 | 4887 |
4884 | 4888 |
4885 } // namespace internal | 4889 } // namespace internal |
4886 } // namespace v8 | 4890 } // namespace v8 |
4887 | 4891 |
4888 #endif // V8_TARGET_ARCH_MIPS64 | 4892 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |