| Index: src/full-codegen/arm/full-codegen-arm.cc
|
| diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc
|
| index e3a4fabf520d34c3b107e3d6331cc7e1951170d6..97e779e0605bdfb28e6ee267d036ec1ef42a6518 100644
|
| --- a/src/full-codegen/arm/full-codegen-arm.cc
|
| +++ b/src/full-codegen/arm/full-codegen-arm.cc
|
| @@ -270,28 +270,32 @@ void FullCodeGenerator::Generate() {
|
| if (arguments != NULL) {
|
| // Function uses arguments object.
|
| Comment cmnt(masm_, "[ Allocate arguments object");
|
| - DCHECK(r1.is(ArgumentsAccessNewDescriptor::function()));
|
| if (!function_in_register_r1) {
|
| // Load this again, if it's used by the local context below.
|
| __ ldr(r1, 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;
|
| - __ mov(ArgumentsAccessNewDescriptor::parameter_count(),
|
| - Operand(Smi::FromInt(num_parameters)));
|
| - __ add(ArgumentsAccessNewDescriptor::parameter_pointer(), fp,
|
| - Operand(StandardFrameConstants::kCallerSPOffset + offset));
|
| -
|
| - // Arguments to ArgumentsAccessStub:
|
| - // 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);
|
| + if (is_strict(language_mode()) || !has_simple_parameters()) {
|
| + FastNewStrictArgumentsStub stub(isolate());
|
| + __ CallStub(&stub);
|
| + } else {
|
| + DCHECK(r1.is(ArgumentsAccessNewDescriptor::function()));
|
| + // Receiver is just before the parameters on the caller's stack.
|
| + int num_parameters = info->scope()->num_parameters();
|
| + int offset = num_parameters * kPointerSize;
|
| + __ mov(ArgumentsAccessNewDescriptor::parameter_count(),
|
| + Operand(Smi::FromInt(num_parameters)));
|
| + __ add(ArgumentsAccessNewDescriptor::parameter_pointer(), fp,
|
| + Operand(StandardFrameConstants::kCallerSPOffset + offset));
|
| +
|
| + // Arguments to ArgumentsAccessStub:
|
| + // function, parameter pointer, parameter count.
|
| + // The stub will rewrite parameter pointer and parameter count if the
|
| + // previous stack frame was an arguments adapter frame.
|
| + ArgumentsAccessStub::Type type = ArgumentsAccessStub::ComputeType(
|
| + literal()->has_duplicate_parameters());
|
| + ArgumentsAccessStub stub(isolate(), type);
|
| + __ CallStub(&stub);
|
| + }
|
|
|
| SetVar(arguments, r0, r1, r2);
|
| }
|
|
|