Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: src/x87/macro-assembler-x87.cc

Issue 1922553002: Get rid of AllocationFlags::TAG_OBJECT (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove TAG_OBJECT from AllocationFlags Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x87/codegen-x87.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/x87/codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698