| Index: src/crankshaft/x87/lithium-codegen-x87.cc
|
| diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc
|
| index 074628b5ef84c048506283b607cb1030aa73f8cc..3b9146147de1523dafe0105d7e5b556714419303 100644
|
| --- a/src/crankshaft/x87/lithium-codegen-x87.cc
|
| +++ b/src/crankshaft/x87/lithium-codegen-x87.cc
|
| @@ -3562,7 +3562,8 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
|
| // Change context.
|
| __ mov(esi, FieldOperand(function_reg, JSFunction::kContextOffset));
|
|
|
| - // Always initialize eax to the number of actual arguments.
|
| + // Always initialize new target and number of actual arguments.
|
| + __ mov(edx, factory()->undefined_value());
|
| __ mov(eax, arity);
|
|
|
| // Invoke function directly.
|
| @@ -3625,11 +3626,13 @@ void LCodeGen::DoCallJSFunction(LCallJSFunction* instr) {
|
| DCHECK(ToRegister(instr->function()).is(edi));
|
| DCHECK(ToRegister(instr->result()).is(eax));
|
|
|
| - __ mov(eax, instr->arity());
|
| -
|
| // Change context.
|
| __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
|
|
|
| + // Always initialize new target and number of actual arguments.
|
| + __ mov(edx, factory()->undefined_value());
|
| + __ mov(eax, instr->arity());
|
| +
|
| bool is_self_call = false;
|
| if (instr->hydrogen()->function()->IsConstant()) {
|
| HConstant* fun_const = HConstant::cast(instr->hydrogen()->function());
|
|
|