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

Unified Diff: src/heap/heap-inl.h

Issue 1374163002: [heap] Reland Remove retry space from AllocateRaw. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/heap/heap.cc ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap-inl.h
diff --git a/src/heap/heap-inl.h b/src/heap/heap-inl.h
index 4d7e31fe6cf1a935bafd0bbf4de681f045fbc3ec..cff69b1e17d4dcdc5ea18f470a9b483f46a30e8d 100644
--- a/src/heap/heap-inl.h
+++ b/src/heap/heap-inl.h
@@ -126,7 +126,7 @@ AllocationResult Heap::AllocateOneByteInternalizedString(
// Allocate string.
HeapObject* result = nullptr;
{
- AllocationResult allocation = AllocateRaw(size, OLD_SPACE, OLD_SPACE);
+ AllocationResult allocation = AllocateRaw(size, OLD_SPACE);
if (!allocation.To(&result)) return allocation;
}
@@ -157,7 +157,7 @@ AllocationResult Heap::AllocateTwoByteInternalizedString(Vector<const uc16> str,
// Allocate string.
HeapObject* result = nullptr;
{
- AllocationResult allocation = AllocateRaw(size, OLD_SPACE, OLD_SPACE);
+ AllocationResult allocation = AllocateRaw(size, OLD_SPACE);
if (!allocation.To(&result)) return allocation;
}
@@ -189,7 +189,6 @@ AllocationResult Heap::CopyFixedDoubleArray(FixedDoubleArray* src) {
AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
- AllocationSpace retry_space,
AllocationAlignment alignment) {
DCHECK(AllowHandleAllocation::IsAllowed());
DCHECK(AllowHeapAllocation::IsAllowed());
@@ -207,19 +206,14 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
HeapObject* object = nullptr;
AllocationResult allocation;
if (NEW_SPACE == space) {
- if (!large_object) {
+ if (large_object) {
+ space = LO_SPACE;
+ } else {
allocation = new_space_.AllocateRaw(size_in_bytes, alignment);
- if (always_allocate() && allocation.IsRetry() &&
- retry_space != NEW_SPACE) {
- space = retry_space;
- } else {
- if (allocation.To(&object)) {
- OnAllocationEvent(object, size_in_bytes);
- }
- return allocation;
+ if (allocation.To(&object)) {
+ OnAllocationEvent(object, size_in_bytes);
}
- } else {
- space = LO_SPACE;
+ return allocation;
}
}
« no previous file with comments | « src/heap/heap.cc ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698