| Index: src/crankshaft/arm/lithium-codegen-arm.cc
|
| diff --git a/src/crankshaft/arm/lithium-codegen-arm.cc b/src/crankshaft/arm/lithium-codegen-arm.cc
|
| index c1b155af49fe53537a93d113064cfb9e3d5f0f3c..6d21fed571a7aac9f4ff42592f92fcfd00b0ec32 100644
|
| --- a/src/crankshaft/arm/lithium-codegen-arm.cc
|
| +++ b/src/crankshaft/arm/lithium-codegen-arm.cc
|
| @@ -3415,7 +3415,8 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
|
| // Change context.
|
| __ ldr(cp, FieldMemOperand(function_reg, JSFunction::kContextOffset));
|
|
|
| - // Always initialize r0 to the number of actual arguments.
|
| + // Always initialize new target and number of actual arguments.
|
| + __ LoadRoot(r3, Heap::kUndefinedValueRootIndex);
|
| __ mov(r0, Operand(arity));
|
|
|
| // Invoke function.
|
| @@ -3797,11 +3798,13 @@ void LCodeGen::DoCallJSFunction(LCallJSFunction* instr) {
|
| DCHECK(ToRegister(instr->function()).is(r1));
|
| DCHECK(ToRegister(instr->result()).is(r0));
|
|
|
| - __ mov(r0, Operand(instr->arity()));
|
| -
|
| // Change context.
|
| __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
|
|
|
| + // Always initialize new target and number of actual arguments.
|
| + __ LoadRoot(r3, Heap::kUndefinedValueRootIndex);
|
| + __ mov(r0, Operand(instr->arity()));
|
| +
|
| // Load the code entry address
|
| __ ldr(ip, FieldMemOperand(r1, JSFunction::kCodeEntryOffset));
|
| __ Call(ip);
|
|
|