| Index: src/mips/full-codegen-mips.cc
|
| diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
|
| index 77708cd3674df552d05f374e1ae40e25f4dc03a3..972210a9c118d2de373d0e512885ccee58d00b8b 100644
|
| --- a/src/mips/full-codegen-mips.cc
|
| +++ b/src/mips/full-codegen-mips.cc
|
| @@ -211,20 +211,22 @@ void FullCodeGenerator::Generate() {
|
| if (heap_slots > 0) {
|
| Comment cmnt(masm_, "[ Allocate context");
|
| // Argument to NewContext is the function, which is still in a1.
|
| - __ push(a1);
|
| if (FLAG_harmony_scoping && info->scope()->is_global_scope()) {
|
| + __ push(a1);
|
| __ Push(info->scope()->GetScopeInfo());
|
| __ CallRuntime(Runtime::kNewGlobalContext, 2);
|
| } else if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| FastNewContextStub stub(heap_slots);
|
| __ CallStub(&stub);
|
| } else {
|
| + __ push(a1);
|
| __ CallRuntime(Runtime::kNewFunctionContext, 1);
|
| }
|
| function_in_register = false;
|
| - // Context is returned in both v0 and cp. It replaces the context
|
| - // passed to us. It's saved in the stack and kept live in cp.
|
| - __ sw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + // Context is returned in v0. It replaces the context passed to us.
|
| + // It's saved in the stack and kept live in cp.
|
| + __ mov(cp, v0);
|
| + __ sw(v0, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| // Copy any necessary parameters into the context.
|
| int num_parameters = info->scope()->num_parameters();
|
| for (int i = 0; i < num_parameters; i++) {
|
|
|