| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index 396ba4f985fcead44a1cec50fc8ad2ca8b401680..92f5a508e8a697e1a11c700c86f228e0de290b6c 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -2372,7 +2372,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;
|
| {
|
| @@ -2393,7 +2393,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; \
|
| { \
|
| @@ -2931,7 +2931,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);
|
| @@ -3142,7 +3142,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);
|
| @@ -3186,7 +3186,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(
|
| @@ -3401,8 +3401,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;
|
| @@ -3603,12 +3602,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;
|
| }
|
|
|
| @@ -3646,7 +3644,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;
|
| {
|
| @@ -3670,7 +3668,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;
|
| {
|
| @@ -3805,7 +3803,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);
|
| }
|
| @@ -3874,7 +3872,7 @@ AllocationResult Heap::AllocateRawFixedDoubleArray(int length,
|
| kDoubleAligned);
|
| }
|
| int size = FixedDoubleArray::SizeFor(length);
|
| - AllocationSpace space = SelectSpace(size, pretenure);
|
| + AllocationSpace space = SelectSpace(pretenure);
|
|
|
| HeapObject* object = nullptr;
|
| {
|
| @@ -3931,10 +3929,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);
|
|
|