| Index: src/mips/full-codegen-mips.cc
|
| diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
|
| index 43325dfb2ca12f7199bc716834dc0b6c232f8a1a..6a59b1b1c931719eea1c696b78227c9196cbd3b0 100644
|
| --- a/src/mips/full-codegen-mips.cc
|
| +++ b/src/mips/full-codegen-mips.cc
|
| @@ -174,9 +174,7 @@ void FullCodeGenerator::Generate() {
|
| // The following three instructions must remain together and unmodified for
|
| // code aging to work properly.
|
| __ Push(ra, fp, cp, a1);
|
| - // Load undefined value here, so the value is ready for the loop
|
| - // below.
|
| - __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
|
| + __ nop(Assembler::CODE_AGE_SEQUENCE_NOP);
|
| // Adjust fp to point to caller's fp.
|
| __ Addu(fp, sp, Operand(2 * kPointerSize));
|
| info->AddNoFrameRange(0, masm_->pc_offset());
|
| @@ -185,8 +183,11 @@ void FullCodeGenerator::Generate() {
|
| int locals_count = info->scope()->num_stack_slots();
|
| // Generators allocate locals, if any, in context slots.
|
| ASSERT(!info->function()->is_generator() || locals_count == 0);
|
| - for (int i = 0; i < locals_count; i++) {
|
| - __ push(at);
|
| + if (locals_count > 0) {
|
| + __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
|
| + for (int i = 0; i < locals_count; i++) {
|
| + __ push(at);
|
| + }
|
| }
|
| }
|
|
|
|
|