Chromium Code Reviews| 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..5ab93a208fd5ce0a17260122a2b9d671b2227cb1 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(t0, 0)); |
|
Paul Lind
2013/05/03 23:24:27
t0 here should be scratch1. (currently, there is o
palfia
2013/05/03 23:50:39
Good catch, thanks! Fixed.
|
| + 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, |