| Index: src/mips/macro-assembler-mips.cc
|
| diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
|
| index 301e92f23d4653b12c74030067544469fa2a8fbc..81e9ec980e6b8b56e2bf79f275046a4ff1999472 100644
|
| --- a/src/mips/macro-assembler-mips.cc
|
| +++ b/src/mips/macro-assembler-mips.cc
|
| @@ -3135,8 +3135,34 @@ void MacroAssembler::AllocateAsciiConsString(Register result,
|
| Register scratch1,
|
| Register scratch2,
|
| Label* gc_required) {
|
| - Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required,
|
| - TAG_OBJECT);
|
| + Label allocate_new_space, install_map;
|
| + AllocationFlags flags = TAG_OBJECT;
|
| +
|
| + ExternalReference high_promotion_mode = ExternalReference::
|
| + new_space_high_promotion_mode_active_address(isolate());
|
| + li(scratch1, Operand(high_promotion_mode));
|
| + lw(scratch1, MemOperand(scratch1, 0));
|
| + Branch(&allocate_new_space, eq, scratch1, Operand(zero_reg));
|
| +
|
| + Allocate(ConsString::kSize,
|
| + result,
|
| + scratch1,
|
| + scratch2,
|
| + gc_required,
|
| + static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE));
|
| +
|
| + jmp(&install_map);
|
| +
|
| + bind(&allocate_new_space);
|
| + Allocate(ConsString::kSize,
|
| + result,
|
| + scratch1,
|
| + scratch2,
|
| + gc_required,
|
| + flags);
|
| +
|
| + bind(&install_map);
|
| +
|
| InitializeNewString(result,
|
| length,
|
| Heap::kConsAsciiStringMapRootIndex,
|
|
|