| Index: src/ia32/macro-assembler-ia32.cc
|
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
|
| index 42d4415c5bb4d9cef0641558726ebde939dd3d0d..fb15302308e6a32e89b14d76d6f0b77732f5756c 100644
|
| --- a/src/ia32/macro-assembler-ia32.cc
|
| +++ b/src/ia32/macro-assembler-ia32.cc
|
| @@ -1578,15 +1578,10 @@ void MacroAssembler::Allocate(int object_size,
|
| // Update allocation top.
|
| UpdateAllocationTopHelper(top_reg, scratch, flags);
|
|
|
| - // Tag result if requested.
|
| - bool tag_result = (flags & TAG_OBJECT) != 0;
|
| if (top_reg.is(result)) {
|
| - if (tag_result) {
|
| - sub(result, Immediate(object_size - kHeapObjectTag));
|
| - } else {
|
| - sub(result, Immediate(object_size));
|
| - }
|
| - } else if (tag_result) {
|
| + sub(result, Immediate(object_size - kHeapObjectTag));
|
| + } else {
|
| + // Tag the result.
|
| DCHECK(kHeapObjectTag == 1);
|
| inc(result);
|
| }
|
| @@ -1660,10 +1655,9 @@ void MacroAssembler::Allocate(int header_size,
|
| cmp(result_end, Operand::StaticVariable(allocation_limit));
|
| j(above, gc_required);
|
|
|
| - if ((flags & TAG_OBJECT) != 0) {
|
| - DCHECK(kHeapObjectTag == 1);
|
| - inc(result);
|
| - }
|
| + // Tag result.
|
| + DCHECK(kHeapObjectTag == 1);
|
| + inc(result);
|
|
|
| // Update allocation top.
|
| UpdateAllocationTopHelper(result_end, scratch, flags);
|
| @@ -1724,11 +1718,9 @@ void MacroAssembler::Allocate(Register object_size,
|
| cmp(result_end, Operand::StaticVariable(allocation_limit));
|
| j(above, gc_required);
|
|
|
| - // Tag result if requested.
|
| - if ((flags & TAG_OBJECT) != 0) {
|
| - DCHECK(kHeapObjectTag == 1);
|
| - inc(result);
|
| - }
|
| + // Tag result.
|
| + DCHECK(kHeapObjectTag == 1);
|
| + inc(result);
|
|
|
| // Update allocation top.
|
| UpdateAllocationTopHelper(result_end, scratch, flags);
|
| @@ -1742,7 +1734,7 @@ void MacroAssembler::AllocateHeapNumber(Register result,
|
| MutableMode mode) {
|
| // Allocate heap number in new space.
|
| Allocate(HeapNumber::kSize, result, scratch1, scratch2, gc_required,
|
| - TAG_OBJECT);
|
| + NO_ALLOCATION_FLAGS);
|
|
|
| Handle<Map> map = mode == MUTABLE
|
| ? isolate()->factory()->mutable_heap_number_map()
|
| @@ -1768,15 +1760,9 @@ void MacroAssembler::AllocateTwoByteString(Register result,
|
| and_(scratch1, Immediate(~kObjectAlignmentMask));
|
|
|
| // Allocate two byte string in new space.
|
| - Allocate(SeqTwoByteString::kHeaderSize,
|
| - times_1,
|
| - scratch1,
|
| - REGISTER_VALUE_IS_INT32,
|
| - result,
|
| - scratch2,
|
| - scratch3,
|
| - gc_required,
|
| - TAG_OBJECT);
|
| + Allocate(SeqTwoByteString::kHeaderSize, times_1, scratch1,
|
| + REGISTER_VALUE_IS_INT32, result, scratch2, scratch3, gc_required,
|
| + NO_ALLOCATION_FLAGS);
|
|
|
| // Set the map, length and hash field.
|
| mov(FieldOperand(result, HeapObject::kMapOffset),
|
| @@ -1802,15 +1788,9 @@ void MacroAssembler::AllocateOneByteString(Register result, Register length,
|
| and_(scratch1, Immediate(~kObjectAlignmentMask));
|
|
|
| // Allocate one-byte string in new space.
|
| - Allocate(SeqOneByteString::kHeaderSize,
|
| - times_1,
|
| - scratch1,
|
| - REGISTER_VALUE_IS_INT32,
|
| - result,
|
| - scratch2,
|
| - scratch3,
|
| - gc_required,
|
| - TAG_OBJECT);
|
| + Allocate(SeqOneByteString::kHeaderSize, times_1, scratch1,
|
| + REGISTER_VALUE_IS_INT32, result, scratch2, scratch3, gc_required,
|
| + NO_ALLOCATION_FLAGS);
|
|
|
| // Set the map, length and hash field.
|
| mov(FieldOperand(result, HeapObject::kMapOffset),
|
| @@ -1830,7 +1810,7 @@ void MacroAssembler::AllocateOneByteString(Register result, int length,
|
|
|
| // Allocate one-byte string in new space.
|
| Allocate(SeqOneByteString::SizeFor(length), result, scratch1, scratch2,
|
| - gc_required, TAG_OBJECT);
|
| + gc_required, NO_ALLOCATION_FLAGS);
|
|
|
| // Set the map, length and hash field.
|
| mov(FieldOperand(result, HeapObject::kMapOffset),
|
| @@ -1848,7 +1828,7 @@ void MacroAssembler::AllocateTwoByteConsString(Register result,
|
| Label* gc_required) {
|
| // Allocate heap number in new space.
|
| Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required,
|
| - TAG_OBJECT);
|
| + NO_ALLOCATION_FLAGS);
|
|
|
| // Set the map. The other fields are left uninitialized.
|
| mov(FieldOperand(result, HeapObject::kMapOffset),
|
| @@ -1860,12 +1840,8 @@ void MacroAssembler::AllocateOneByteConsString(Register result,
|
| Register scratch1,
|
| Register scratch2,
|
| Label* gc_required) {
|
| - Allocate(ConsString::kSize,
|
| - result,
|
| - scratch1,
|
| - scratch2,
|
| - gc_required,
|
| - TAG_OBJECT);
|
| + Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required,
|
| + NO_ALLOCATION_FLAGS);
|
|
|
| // Set the map. The other fields are left uninitialized.
|
| mov(FieldOperand(result, HeapObject::kMapOffset),
|
| @@ -1879,7 +1855,7 @@ void MacroAssembler::AllocateTwoByteSlicedString(Register result,
|
| Label* gc_required) {
|
| // Allocate heap number in new space.
|
| Allocate(SlicedString::kSize, result, scratch1, scratch2, gc_required,
|
| - TAG_OBJECT);
|
| + NO_ALLOCATION_FLAGS);
|
|
|
| // Set the map. The other fields are left uninitialized.
|
| mov(FieldOperand(result, HeapObject::kMapOffset),
|
| @@ -1893,7 +1869,7 @@ void MacroAssembler::AllocateOneByteSlicedString(Register result,
|
| Label* gc_required) {
|
| // Allocate heap number in new space.
|
| Allocate(SlicedString::kSize, result, scratch1, scratch2, gc_required,
|
| - TAG_OBJECT);
|
| + NO_ALLOCATION_FLAGS);
|
|
|
| // Set the map. The other fields are left uninitialized.
|
| mov(FieldOperand(result, HeapObject::kMapOffset),
|
| @@ -1909,7 +1885,8 @@ void MacroAssembler::AllocateJSValue(Register result, Register constructor,
|
| DCHECK(!result.is(value));
|
|
|
| // Allocate JSValue in new space.
|
| - Allocate(JSValue::kSize, result, scratch, no_reg, gc_required, TAG_OBJECT);
|
| + Allocate(JSValue::kSize, result, scratch, no_reg, gc_required,
|
| + NO_ALLOCATION_FLAGS);
|
|
|
| // Initialize the JSValue.
|
| LoadGlobalFunctionInitialMap(constructor, scratch);
|
|
|