Index: src/full-codegen/ppc/full-codegen-ppc.cc |
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc |
index 079c22d212d96e78eb56a2d5047ea2eb2d94e673..41b89da3957b960819bc225c5a603aaae46f5d97 100644 |
--- a/src/full-codegen/ppc/full-codegen-ppc.cc |
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc |
@@ -263,21 +263,12 @@ void FullCodeGenerator::Generate() { |
Variable* rest_param = scope()->rest_parameter(&rest_index); |
if (rest_param) { |
Comment cmnt(masm_, "[ Allocate rest parameter array"); |
- |
- int num_parameters = info->scope()->num_parameters(); |
- int offset = num_parameters * kPointerSize; |
- |
- __ LoadSmiLiteral(RestParamAccessDescriptor::parameter_count(), |
- Smi::FromInt(num_parameters)); |
- __ addi(RestParamAccessDescriptor::parameter_pointer(), fp, |
- Operand(StandardFrameConstants::kCallerSPOffset + offset)); |
- __ LoadSmiLiteral(RestParamAccessDescriptor::rest_parameter_index(), |
- Smi::FromInt(rest_index)); |
- function_in_register_r4 = false; |
- |
- RestParamAccessStub stub(isolate()); |
+ if (!function_in_register_r4) { |
+ __ LoadP(r4, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
+ } |
+ FastNewRestParameterStub stub(isolate()); |
__ CallStub(&stub); |
- |
+ function_in_register_r4 = false; |
SetVar(rest_param, r3, r4, r5); |
} |