Index: src/full-codegen/arm64/full-codegen-arm64.cc |
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc |
index 54378d006504fd752cfbcedb3218f58b86f998d0..0a82b86f9b4f53544eb03eaff4d0de4c0d4e8290 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -281,23 +281,11 @@ void FullCodeGenerator::Generate() { |
if (is_strict(language_mode()) || !has_simple_parameters()) { |
FastNewStrictArgumentsStub stub(isolate()); |
__ CallStub(&stub); |
+ } else if (literal()->has_duplicate_parameters()) { |
+ __ Push(x1); |
+ __ CallRuntime(Runtime::kNewSloppyArguments_Generic); |
} else { |
- DCHECK(x1.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(), |
- Smi::FromInt(num_parameters)); |
- __ Add(ArgumentsAccessNewDescriptor::parameter_pointer(), fp, |
- 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); |
} |