Index: src/x87/macro-assembler-x87.cc |
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc |
index 8111b06a2fe3f5ec9b55b0a424cc6401584abfe9..840913797c72897fd442d0225e9dce7581ff1f16 100644 |
--- a/src/x87/macro-assembler-x87.cc |
+++ b/src/x87/macro-assembler-x87.cc |
@@ -1521,14 +1521,9 @@ void MacroAssembler::Allocate(int object_size, |
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 { |
DCHECK(kHeapObjectTag == 1); |
inc(result); |
} |
@@ -1602,10 +1597,8 @@ 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); |
- } |
+ DCHECK(kHeapObjectTag == 1); |
+ inc(result); |
// Update allocation top. |
UpdateAllocationTopHelper(result_end, scratch, flags); |
@@ -1666,11 +1659,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); |
@@ -1684,7 +1675,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() |
@@ -1710,15 +1701,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), |
@@ -1744,15 +1729,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), |
@@ -1772,7 +1751,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), |
@@ -1790,7 +1769,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), |
@@ -1802,12 +1781,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), |
@@ -1821,7 +1796,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), |
@@ -1835,7 +1810,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), |
@@ -1851,7 +1826,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); |