| 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 8aa7aaca6a557b80d12062f4a9ac34aec9d05143..8a68330ed0f6b8c8400140e5cf625c0c2324798b 100644
|
| --- a/src/full-codegen/ppc/full-codegen-ppc.cc
|
| +++ b/src/full-codegen/ppc/full-codegen-ppc.cc
|
| @@ -294,31 +294,26 @@ void FullCodeGenerator::Generate() {
|
| if (arguments != NULL) {
|
| // Function uses arguments object.
|
| Comment cmnt(masm_, "[ Allocate arguments object");
|
| + DCHECK(r4.is(ArgumentsAccessNewDescriptor::function()));
|
| if (!function_in_register_r4) {
|
| // Load this again, if it's used by the local context below.
|
| - __ LoadP(r6, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
|
| - } else {
|
| - __ mr(r6, r4);
|
| + __ LoadP(r4, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
|
| }
|
| // Receiver is just before the parameters on the caller's stack.
|
| int num_parameters = info->scope()->num_parameters();
|
| int offset = num_parameters * kPointerSize;
|
| - __ addi(r5, fp, Operand(StandardFrameConstants::kCallerSPOffset + offset));
|
| - __ LoadSmiLiteral(r4, Smi::FromInt(num_parameters));
|
| - __ Push(r6, r5, r4);
|
| + __ LoadSmiLiteral(ArgumentsAccessNewDescriptor::parameter_count(),
|
| + Smi::FromInt(num_parameters));
|
| + __ addi(ArgumentsAccessNewDescriptor::parameter_pointer(), fp,
|
| + Operand(StandardFrameConstants::kCallerSPOffset + offset));
|
|
|
| // Arguments to ArgumentsAccessStub:
|
| - // function, receiver address, parameter count.
|
| - // The stub will rewrite receiver and parameter count if the previous
|
| - // stack frame was an arguments adapter frame.
|
| - ArgumentsAccessStub::Type type;
|
| - if (is_strict(language_mode()) || !has_simple_parameters()) {
|
| - type = ArgumentsAccessStub::NEW_STRICT;
|
| - } else if (literal()->has_duplicate_parameters()) {
|
| - type = ArgumentsAccessStub::NEW_SLOPPY_SLOW;
|
| - } else {
|
| - type = ArgumentsAccessStub::NEW_SLOPPY_FAST;
|
| - }
|
| + // function, parameter pointer, parameter count.
|
| + // The stub will rewrite parameter pointer and parameter count if the
|
| + // previous stack frame was an arguments adapter frame.
|
| + bool is_unmapped = is_strict(language_mode()) || !has_simple_parameters();
|
| + ArgumentsAccessStub::Type type = ArgumentsAccessStub::ComputeType(
|
| + is_unmapped, literal()->has_duplicate_parameters());
|
| ArgumentsAccessStub stub(isolate(), type);
|
| __ CallStub(&stub);
|
|
|
|
|