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 e61bbfa9471d583e00a3ad3f6485ad2f119d636d..f03946d5703f636c907dc5887b2cdf2a9dfa4813 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -277,23 +277,11 @@ void FullCodeGenerator::Generate() { |
if (is_strict(language_mode()) || !has_simple_parameters()) { |
FastNewStrictArgumentsStub stub(isolate()); |
__ CallStub(&stub); |
+ } else if (literal()->has_duplicate_parameters()) { |
+ __ Push(r1); |
+ __ CallRuntime(Runtime::kNewSloppyArguments_Generic); |
} 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); |
+ FastNewSloppyArgumentsStub stub(isolate()); |
__ CallStub(&stub); |
} |