| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index 533d32c747427cb9ee3a9aad1d3fb54af98c3b62..bc3d5513133429b3cc1338813c6f97a7010918e5 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -1609,9 +1609,18 @@ void LCodeGen::DoCallGlobal(LCallGlobal* instr) {
|
|
|
|
|
| void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) {
|
| + ASSERT(ToRegister(instr->input()).is(r0));
|
| ASSERT(ToRegister(instr->result()).is(r0));
|
| +
|
| + // The receiver slot in the outgoing arguments holds the global object,
|
| + // because that's what the unoptimized code expects if we deoptimize the
|
| + // argument subexpressions. Patch it to the global receiver before making
|
| + // the call.
|
| + int arity = instr->arity(); // Arity does not include receiver.
|
| + __ str(r0, MemOperand(sp, arity * kPointerSize));
|
| +
|
| __ mov(r1, Operand(instr->target()));
|
| - CallKnownFunction(instr->target(), instr->arity(), instr);
|
| + CallKnownFunction(instr->target(), arity, instr);
|
| }
|
|
|
|
|
|
|