| Index: src/ia32/builtins-ia32.cc
|
| diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
|
| index 499044360f43b4b4cd81828b5a05eafa87318532..6b39f6442df40828f3ad0bc81cb763672f1586fb 100644
|
| --- a/src/ia32/builtins-ia32.cc
|
| +++ b/src/ia32/builtins-ia32.cc
|
| @@ -1577,6 +1577,21 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
|
|
|
| { // Too few parameters: Actual < expected.
|
| __ bind(&too_few);
|
| +
|
| + // If the function is strong we need to throw an error.
|
| + Label weak_function;
|
| + __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
|
| + __ test_b(FieldOperand(ecx, SharedFunctionInfo::kStrongModeByteOffset),
|
| + 1 << SharedFunctionInfo::kStrongModeBitWithinByte);
|
| + __ j(equal, &weak_function, Label::kNear);
|
| +
|
| + {
|
| + FrameScope frame(masm, StackFrame::MANUAL);
|
| + EnterArgumentsAdaptorFrame(masm);
|
| + __ CallRuntime(Runtime::kThrowStrongModeTooFewArguments, 0);
|
| + }
|
| +
|
| + __ bind(&weak_function);
|
| EnterArgumentsAdaptorFrame(masm);
|
|
|
| // Copy receiver and all actual arguments.
|
|
|