| Index: src/arm64/builtins-arm64.cc
|
| diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc
|
| index 3df8896576278835e77061408133ea318ae9c865..8d2a67af8cd0dfc0123abbb7de321f96b56c3933 100644
|
| --- a/src/arm64/builtins-arm64.cc
|
| +++ b/src/arm64/builtins-arm64.cc
|
| @@ -1733,13 +1733,31 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
|
|
|
| { // Too few parameters: Actual < expected
|
| __ Bind(&too_few);
|
| - EnterArgumentsAdaptorFrame(masm);
|
|
|
| Register copy_from = x10;
|
| Register copy_end = x11;
|
| Register copy_to = x12;
|
| Register scratch1 = x13, scratch2 = x14;
|
|
|
| + // If the function is strong we need to throw an error.
|
| + Label weak_function;
|
| + __ Ldr(scratch1,
|
| + FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset));
|
| + __ Ldr(scratch2.W(),
|
| + FieldMemOperand(scratch1, SharedFunctionInfo::kCompilerHintsOffset));
|
| + __ TestAndBranchIfAllClear(scratch2.W(),
|
| + (1 << SharedFunctionInfo::kStrongModeFunction),
|
| + &weak_function);
|
| +
|
| + {
|
| + FrameScope frame(masm, StackFrame::MANUAL);
|
| + EnterArgumentsAdaptorFrame(masm);
|
| + __ CallRuntime(Runtime::kThrowStrongModeTooFewArguments, 0);
|
| + }
|
| +
|
| + __ bind(&weak_function);
|
| + EnterArgumentsAdaptorFrame(masm);
|
| +
|
| __ Lsl(argc_expected, argc_expected, kPointerSizeLog2);
|
| __ Lsl(argc_actual, argc_actual, kPointerSizeLog2);
|
|
|
|
|