Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 31b93e71991e219b5c6050bd0f17bd890f6018ec..bafce6fc6d1461769c41ae56b61b56047728b775 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -2364,7 +2364,7 @@ AllocationResult Heap::AllocateHeapNumber(double value, MutableMode mode, |
int size = HeapNumber::kSize; |
STATIC_ASSERT(HeapNumber::kSize <= Page::kMaxRegularHeapObjectSize); |
- AllocationSpace space = SelectSpace(size, pretenure); |
+ AllocationSpace space = SelectSpace(pretenure); |
HeapObject* result = nullptr; |
{ |
@@ -2385,7 +2385,7 @@ AllocationResult Heap::AllocateHeapNumber(double value, MutableMode mode, |
int size = Type::kSize; \ |
STATIC_ASSERT(Type::kSize <= Page::kMaxRegularHeapObjectSize); \ |
\ |
- AllocationSpace space = SelectSpace(size, pretenure); \ |
+ AllocationSpace space = SelectSpace(pretenure); \ |
\ |
HeapObject* result = nullptr; \ |
{ \ |
@@ -2923,7 +2923,7 @@ AllocationResult Heap::AllocateByteArray(int length, PretenureFlag pretenure) { |
v8::internal::Heap::FatalProcessOutOfMemory("invalid array length", true); |
} |
int size = ByteArray::SizeFor(length); |
- AllocationSpace space = SelectSpace(size, pretenure); |
+ AllocationSpace space = SelectSpace(pretenure); |
HeapObject* result = nullptr; |
{ |
AllocationResult allocation = AllocateRaw(size, space, OLD_SPACE); |
@@ -3134,7 +3134,7 @@ AllocationResult Heap::AllocateFixedTypedArrayWithExternalPointer( |
int length, ExternalArrayType array_type, void* external_pointer, |
PretenureFlag pretenure) { |
int size = FixedTypedArrayBase::kHeaderSize; |
- AllocationSpace space = SelectSpace(size, pretenure); |
+ AllocationSpace space = SelectSpace(pretenure); |
HeapObject* result = nullptr; |
{ |
AllocationResult allocation = AllocateRaw(size, space, OLD_SPACE); |
@@ -3178,7 +3178,7 @@ AllocationResult Heap::AllocateFixedTypedArray(int length, |
ForFixedTypedArray(array_type, &element_size, &elements_kind); |
int size = OBJECT_POINTER_ALIGN(length * element_size + |
FixedTypedArrayBase::kDataOffset); |
- AllocationSpace space = SelectSpace(size, pretenure); |
+ AllocationSpace space = SelectSpace(pretenure); |
HeapObject* object = nullptr; |
AllocationResult allocation = AllocateRaw( |
@@ -3393,8 +3393,7 @@ AllocationResult Heap::AllocateJSObjectFromMap( |
FixedArray* properties = empty_fixed_array(); |
// Allocate the JSObject. |
- int size = map->instance_size(); |
- AllocationSpace space = SelectSpace(size, pretenure); |
+ AllocationSpace space = SelectSpace(pretenure); |
JSObject* js_obj = nullptr; |
AllocationResult allocation = Allocate(map, space, allocation_site); |
if (!allocation.To(&js_obj)) return allocation; |
@@ -3595,12 +3594,11 @@ AllocationResult Heap::AllocateInternalizedStringImpl(T t, int chars, |
map = internalized_string_map(); |
size = SeqTwoByteString::SizeFor(chars); |
} |
- AllocationSpace space = SelectSpace(size, TENURED); |
// Allocate string. |
HeapObject* result = nullptr; |
{ |
- AllocationResult allocation = AllocateRaw(size, space, OLD_SPACE); |
+ AllocationResult allocation = AllocateRaw(size, OLD_SPACE, OLD_SPACE); |
if (!allocation.To(&result)) return allocation; |
} |
@@ -3638,7 +3636,7 @@ AllocationResult Heap::AllocateRawOneByteString(int length, |
DCHECK_GE(String::kMaxLength, length); |
int size = SeqOneByteString::SizeFor(length); |
DCHECK(size <= SeqOneByteString::kMaxSize); |
- AllocationSpace space = SelectSpace(size, pretenure); |
+ AllocationSpace space = SelectSpace(pretenure); |
HeapObject* result = nullptr; |
{ |
@@ -3662,7 +3660,7 @@ AllocationResult Heap::AllocateRawTwoByteString(int length, |
DCHECK_GE(String::kMaxLength, length); |
int size = SeqTwoByteString::SizeFor(length); |
DCHECK(size <= SeqTwoByteString::kMaxSize); |
- AllocationSpace space = SelectSpace(size, pretenure); |
+ AllocationSpace space = SelectSpace(pretenure); |
HeapObject* result = nullptr; |
{ |
@@ -3797,7 +3795,7 @@ AllocationResult Heap::AllocateRawFixedArray(int length, |
v8::internal::Heap::FatalProcessOutOfMemory("invalid array length", true); |
} |
int size = FixedArray::SizeFor(length); |
- AllocationSpace space = SelectSpace(size, pretenure); |
+ AllocationSpace space = SelectSpace(pretenure); |
return AllocateRaw(size, space, OLD_SPACE); |
} |
@@ -3866,7 +3864,7 @@ AllocationResult Heap::AllocateRawFixedDoubleArray(int length, |
kDoubleAligned); |
} |
int size = FixedDoubleArray::SizeFor(length); |
- AllocationSpace space = SelectSpace(size, pretenure); |
+ AllocationSpace space = SelectSpace(pretenure); |
HeapObject* object = nullptr; |
{ |
@@ -3923,10 +3921,9 @@ AllocationResult Heap::AllocateStruct(InstanceType type) { |
return exception(); |
} |
int size = map->instance_size(); |
- AllocationSpace space = SelectSpace(size, TENURED); |
Struct* result = nullptr; |
{ |
- AllocationResult allocation = Allocate(map, space); |
+ AllocationResult allocation = Allocate(map, OLD_SPACE); |
if (!allocation.To(&result)) return allocation; |
} |
result->InitializeBody(size); |