Chromium Code Reviews| Index: src/ppc/builtins-ppc.cc |
| diff --git a/src/ppc/builtins-ppc.cc b/src/ppc/builtins-ppc.cc |
| index eed082d6f95865906b54f1a3b57707560c753a14..9c969fd3f902d4279b105e8bc57897d74c8e6cd5 100644 |
| --- a/src/ppc/builtins-ppc.cc |
| +++ b/src/ppc/builtins-ppc.cc |
| @@ -1763,6 +1763,27 @@ 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; |
| + __ LoadP(r7, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); |
| + __ lwz(r7, FieldMemOperand(r7, SharedFunctionInfo::kCompilerHintsOffset)); |
| + __ TestBit(r7, |
| +#if V8_TARGET_ARCH_PPC64 |
|
paul.l...
2015/05/12 01:49:49
Can you avoid ifdef here by using SharedFunctionIn
MTBrandyberry
2015/05/12 13:49:05
Makes sense. I'll look at doing this in a future
|
| + SharedFunctionInfo::kStrongModeFunction, |
| +#else |
| + SharedFunctionInfo::kStrongModeFunction + kSmiTagSize, |
| +#endif |
| + r0); |
| + __ beq(&weak_function, cr0); |
| + |
| + { |
| + FrameScope frame(masm, StackFrame::MANUAL); |
| + EnterArgumentsAdaptorFrame(masm); |
| + __ CallRuntime(Runtime::kThrowStrongModeTooFewArguments, 0); |
| + } |
| + |
| + __ bind(&weak_function); |
| EnterArgumentsAdaptorFrame(masm); |
| // Calculate copy start address into r0 and copy end address is fp. |