| Index: src/ia32/macro-assembler-ia32.cc
|
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
|
| index da29ce7cdd28726be2ac0636427981dc75caf8d7..175b1ca1d2fecb2c0d921283e64719c83e95e7cc 100644
|
| --- a/src/ia32/macro-assembler-ia32.cc
|
| +++ b/src/ia32/macro-assembler-ia32.cc
|
| @@ -1603,10 +1603,32 @@ void MacroAssembler::AllocateAsciiConsString(Register result,
|
| Register scratch1,
|
| Register scratch2,
|
| Label* gc_required) {
|
| - // Allocate heap number in new space.
|
| - 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());
|
| +
|
| + test(Operand::StaticVariable(high_promotion_mode), Immediate(1));
|
| + j(zero, &allocate_new_space);
|
| +
|
| + 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);
|
| // Set the map. The other fields are left uninitialized.
|
| mov(FieldOperand(result, HeapObject::kMapOffset),
|
| Immediate(isolate()->factory()->cons_ascii_string_map()));
|
|
|