| Index: src/crankshaft/mips64/lithium-codegen-mips64.cc
|
| diff --git a/src/crankshaft/mips64/lithium-codegen-mips64.cc b/src/crankshaft/mips64/lithium-codegen-mips64.cc
|
| index ca809bd69512b2f1ae39918fe3a9070549c6b4dd..22650ee9fec1447691c561fcb4c4e0ddce8779a6 100644
|
| --- a/src/crankshaft/mips64/lithium-codegen-mips64.cc
|
| +++ b/src/crankshaft/mips64/lithium-codegen-mips64.cc
|
| @@ -3533,7 +3533,8 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
|
| // Change context.
|
| __ ld(cp, FieldMemOperand(function_reg, JSFunction::kContextOffset));
|
|
|
| - // Always initialize a0 to the number of actual arguments.
|
| + // Always initialize new target and number of actual arguments.
|
| + __ LoadRoot(a3, Heap::kUndefinedValueRootIndex);
|
| __ li(a0, Operand(arity));
|
|
|
| // Invoke function.
|
| @@ -3960,11 +3961,13 @@ void LCodeGen::DoCallJSFunction(LCallJSFunction* instr) {
|
| DCHECK(ToRegister(instr->function()).is(a1));
|
| DCHECK(ToRegister(instr->result()).is(v0));
|
|
|
| - __ li(a0, Operand(instr->arity()));
|
| -
|
| // Change context.
|
| __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset));
|
|
|
| + // Always initialize new target and number of actual arguments.
|
| + __ LoadRoot(a3, Heap::kUndefinedValueRootIndex);
|
| + __ li(a0, Operand(instr->arity()));
|
| +
|
| // Load the code entry address
|
| __ ld(at, FieldMemOperand(a1, JSFunction::kCodeEntryOffset));
|
| __ Call(at);
|
|
|