| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index d3b9d5ba70276050e0a81e7454ac41eeb42b28a1..05b6f3c5bfea2f261125ae3c241f00bae9acb22a 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -292,17 +292,18 @@ bool LCodeGen::GeneratePrologue() {
|
| if (heap_slots > 0) {
|
| Comment(";;; Allocate local context");
|
| // Argument to NewContext is the function, which is still in edi.
|
| - __ push(edi);
|
| if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| FastNewContextStub stub(heap_slots);
|
| __ CallStub(&stub);
|
| } else {
|
| + __ push(edi);
|
| __ CallRuntime(Runtime::kNewFunctionContext, 1);
|
| }
|
| RecordSafepoint(Safepoint::kNoLazyDeopt);
|
| - // Context is returned in both eax and esi. It replaces the context
|
| - // passed to us. It's saved in the stack and kept live in esi.
|
| - __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), esi);
|
| + // Context is returned in eax. It replaces the context passed to us.
|
| + // It's saved in the stack and kept live in esi.
|
| + __ mov(esi, eax);
|
| + __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax);
|
|
|
| // Copy parameters into context if necessary.
|
| int num_parameters = scope()->num_parameters();
|
|
|