OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 266 |
267 // Possibly allocate RestParameters | 267 // Possibly allocate RestParameters |
268 int rest_index; | 268 int rest_index; |
269 Variable* rest_param = scope()->rest_parameter(&rest_index); | 269 Variable* rest_param = scope()->rest_parameter(&rest_index); |
270 if (rest_param) { | 270 if (rest_param) { |
271 Comment cmnt(masm_, "[ Allocate rest parameter array"); | 271 Comment cmnt(masm_, "[ Allocate rest parameter array"); |
272 | 272 |
273 int num_parameters = info->scope()->num_parameters(); | 273 int num_parameters = info->scope()->num_parameters(); |
274 int offset = num_parameters * kPointerSize; | 274 int offset = num_parameters * kPointerSize; |
275 | 275 |
276 __ addi(r6, fp, Operand(StandardFrameConstants::kCallerSPOffset + offset)); | 276 __ LoadSmiLiteral(RestParamAccessDescriptor::parameter_count(), |
277 __ LoadSmiLiteral(r5, Smi::FromInt(num_parameters)); | 277 Operand(Smi::FromInt(num_parameters))); |
278 __ LoadSmiLiteral(r4, Smi::FromInt(rest_index)); | 278 __ addi(RestParamAccessDescriptor::parameter_pointer(), fp, |
279 __ LoadSmiLiteral(r3, Smi::FromInt(language_mode())); | 279 Operand(StandardFrameConstants::kCallerSPOffset + offset)); |
280 __ Push(r6, r5, r4, r3); | 280 __ LoadSmiLiteral(RestParamAccessDescriptor::rest_parameter_index(), |
| 281 Operand(Smi::FromInt(rest_index))); |
| 282 __ LoadSmiLiteral(RestParamAccessDescriptor::language_mode(), |
| 283 Operand(Smi::FromInt(language_mode()))); |
| 284 DCHECK(r4.is(RestParamAccessDescriptor::language_mode())); |
281 function_in_register_r4 = false; | 285 function_in_register_r4 = false; |
282 | 286 |
283 RestParamAccessStub stub(isolate()); | 287 RestParamAccessStub stub(isolate()); |
284 __ CallStub(&stub); | 288 __ CallStub(&stub); |
285 | 289 |
286 SetVar(rest_param, r3, r4, r5); | 290 SetVar(rest_param, r3, r4, r5); |
287 } | 291 } |
288 | 292 |
289 Variable* arguments = scope()->arguments(); | 293 Variable* arguments = scope()->arguments(); |
290 if (arguments != NULL) { | 294 if (arguments != NULL) { |
(...skipping 4568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4859 return ON_STACK_REPLACEMENT; | 4863 return ON_STACK_REPLACEMENT; |
4860 } | 4864 } |
4861 | 4865 |
4862 DCHECK(interrupt_address == | 4866 DCHECK(interrupt_address == |
4863 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4867 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4864 return OSR_AFTER_STACK_CHECK; | 4868 return OSR_AFTER_STACK_CHECK; |
4865 } | 4869 } |
4866 } // namespace internal | 4870 } // namespace internal |
4867 } // namespace v8 | 4871 } // namespace v8 |
4868 #endif // V8_TARGET_ARCH_PPC | 4872 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |