| Index: src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/crankshaft/ia32/lithium-codegen-ia32.cc b/src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| index 7b05078a9bdba4629fb62392e1d24ebe1bfcb974..eb06ad792eb4057364677c102623b61b967bf3ad 100644
|
| --- a/src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc
|
| @@ -3291,7 +3291,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.
|
| @@ -3354,11 +3355,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());
|
|
|