Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index f7645b2913e45e533e8f7c771e8bf5f82657bded..b4e36a66919c3cff80658b5c7588115f38d8063b 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -272,23 +272,11 @@ void FullCodeGenerator::Generate() { |
if (is_strict(language_mode()) || !has_simple_parameters()) { |
FastNewStrictArgumentsStub stub(isolate()); |
__ CallStub(&stub); |
+ } else if (literal()->has_duplicate_parameters()) { |
+ __ Push(edi); |
+ __ CallRuntime(Runtime::kNewSloppyArguments_Generic); |
} else { |
- DCHECK(edi.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(), |
- Immediate(Smi::FromInt(num_parameters))); |
- __ lea(ArgumentsAccessNewDescriptor::parameter_pointer(), |
- Operand(ebp, 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); |
} |