| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index 0f6c851b0488c239c8d92862c214194ec5a96470..08686e37c9781d1e97c359b25fdd8eda5c353892 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -182,20 +182,22 @@ void FullCodeGenerator::Generate() {
|
| if (heap_slots > 0) {
|
| Comment cmnt(masm_, "[ Allocate context");
|
| // Argument to NewContext is the function, which is still in edi.
|
| - __ push(edi);
|
| if (FLAG_harmony_scoping && info->scope()->is_global_scope()) {
|
| + __ push(edi);
|
| __ Push(info->scope()->GetScopeInfo());
|
| __ CallRuntime(Runtime::kNewGlobalContext, 2);
|
| } else if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| FastNewContextStub stub(heap_slots);
|
| __ CallStub(&stub);
|
| } else {
|
| + __ push(edi);
|
| __ CallRuntime(Runtime::kNewFunctionContext, 1);
|
| }
|
| function_in_register = false;
|
| - // 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 = info->scope()->num_parameters();
|
|
|