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

Unified Diff: test/cctest/heap/heap-utils.cc

Issue 2031493002: Revert of Provide a tagged allocation top pointer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/x64/macro-assembler-x64.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/heap/heap-utils.cc
diff --git a/test/cctest/heap/heap-utils.cc b/test/cctest/heap/heap-utils.cc
index d85529179dda6e3741a6a6eb308ad6393b4ab7e7..e6daa454417ab5b78d87873e4420ea61b372522a 100644
--- a/test/cctest/heap/heap-utils.cc
+++ b/test/cctest/heap/heap-utils.cc
@@ -45,7 +45,8 @@
} else {
heap->new_space()->DisableInlineAllocationSteps();
int overall_free_memory =
- static_cast<int>(heap->new_space()->limit() - heap->new_space()->top());
+ static_cast<int>(*heap->new_space()->allocation_limit_address() -
+ *heap->new_space()->allocation_top_address());
CHECK(padding_size <= overall_free_memory || overall_free_memory == 0);
}
while (free_memory > 0) {
@@ -58,13 +59,9 @@
if (length <= 0) {
// Not enough room to create another fixed array. Let's create a filler.
if (free_memory > (2 * kPointerSize)) {
- if (tenure == i::TENURED) {
- heap->CreateFillerObjectAt(heap->old_space()->top(), free_memory,
- ClearRecordedSlots::kNo);
- } else {
- heap->CreateFillerObjectAt(heap->new_space()->top(), free_memory,
- ClearRecordedSlots::kNo);
- }
+ heap->CreateFillerObjectAt(
+ *heap->old_space()->allocation_top_address(), free_memory,
+ ClearRecordedSlots::kNo);
}
break;
}
@@ -80,7 +77,8 @@
void AllocateAllButNBytes(v8::internal::NewSpace* space, int extra_bytes,
std::vector<Handle<FixedArray>>* out_handles) {
space->DisableInlineAllocationSteps();
- int space_remaining = static_cast<int>(space->limit() - space->top());
+ int space_remaining = static_cast<int>(*space->allocation_limit_address() -
+ *space->allocation_top_address());
CHECK(space_remaining >= extra_bytes);
int new_linear_size = space_remaining - extra_bytes;
if (new_linear_size == 0) return;
@@ -98,7 +96,8 @@
bool FillUpOnePage(v8::internal::NewSpace* space,
std::vector<Handle<FixedArray>>* out_handles) {
space->DisableInlineAllocationSteps();
- int space_remaining = static_cast<int>(space->limit() - space->top());
+ int space_remaining = static_cast<int>(*space->allocation_limit_address() -
+ *space->allocation_top_address());
if (space_remaining == 0) return false;
std::vector<Handle<FixedArray>> handles =
heap::CreatePadding(space->heap(), space_remaining, i::NOT_TENURED);
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698