Chromium Code Reviews| Index: src/arm64/builtins-arm64.cc |
| diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc |
| index 8d2a67af8cd0dfc0123abbb7de321f96b56c3933..cdf6a1321747f15fb1c20bbbea2761436ae1003c 100644 |
| --- a/src/arm64/builtins-arm64.cc |
| +++ b/src/arm64/builtins-arm64.cc |
| @@ -1740,14 +1740,21 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
| Register scratch1 = x13, scratch2 = x14; |
| // If the function is strong we need to throw an error. |
| - Label weak_function; |
| + Label no_strong_error; |
| __ Ldr(scratch1, |
| FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset)); |
| __ Ldr(scratch2.W(), |
| FieldMemOperand(scratch1, SharedFunctionInfo::kCompilerHintsOffset)); |
| __ TestAndBranchIfAllClear(scratch2.W(), |
| (1 << SharedFunctionInfo::kStrongModeFunction), |
| - &weak_function); |
| + &no_strong_error); |
| + |
| + // What we really care about is the required number of arguments. |
| + DCHECK_EQ(kPointerSize, kInt64Size); |
| + __ Ldrsh(scratch2.W(), |
| + FieldMemOperand(scratch1, SharedFunctionInfo::kLengthOffset)); |
|
paul.l...
2015/05/19 15:30:56
Ldrsh() should be Ldr() , per previous comment. (S
arv (Not doing code reviews)
2015/05/19 15:54:38
Done.
|
| + __ Cmp(argc_actual, Operand(scratch2, LSR, 1)); |
| + __ B(ge, &no_strong_error); |
| { |
| FrameScope frame(masm, StackFrame::MANUAL); |
| @@ -1755,7 +1762,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
| __ CallRuntime(Runtime::kThrowStrongModeTooFewArguments, 0); |
| } |
| - __ bind(&weak_function); |
| + __ Bind(&no_strong_error); |
| EnterArgumentsAdaptorFrame(masm); |
| __ Lsl(argc_expected, argc_expected, kPointerSizeLog2); |