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

Unified Diff: test/cctest/cctest.h

Issue 1404523002: [heap] inline allocation steps refactor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: work-around the requirements that set_limit needs to be aligned Created 5 years, 2 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/spaces.cc ('k') | test/cctest/test-spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.h
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
index ecfd1a283edbfd6a0e9f73bf366bae0377e5dc61..4cfb8b0d7075d94f1d64f3cc44bb6e84c027895d 100644
--- a/test/cctest/cctest.h
+++ b/test/cctest/cctest.h
@@ -525,11 +525,6 @@ static inline void ExpectUndefined(const char* code) {
}
-static inline void DisableInlineAllocationSteps(v8::internal::NewSpace* space) {
- space->LowerInlineAllocationLimit(0);
-}
-
-
static inline void CheckDoubleEquals(double expected, double actual) {
const double kEpsilon = 1e-10;
CHECK_LE(expected, actual + kEpsilon);
@@ -557,7 +552,7 @@ static inline void CreatePadding(i::Heap* heap, int padding_size,
*heap->old_space()->allocation_top_address());
CHECK(padding_size <= current_free_memory || current_free_memory == 0);
} else {
- DisableInlineAllocationSteps(heap->new_space());
+ heap->new_space()->DisableInlineAllocationSteps();
int current_free_memory =
static_cast<int>(*heap->new_space()->allocation_limit_address() -
*heap->new_space()->allocation_top_address());
@@ -587,7 +582,7 @@ static inline void CreatePadding(i::Heap* heap, int padding_size,
// Helper function that simulates a full new-space in the heap.
static inline bool FillUpOnePage(v8::internal::NewSpace* space) {
- DisableInlineAllocationSteps(space);
+ space->DisableInlineAllocationSteps();
int space_remaining = static_cast<int>(*space->allocation_limit_address() -
*space->allocation_top_address());
if (space_remaining == 0) return false;
@@ -599,7 +594,7 @@ static inline bool FillUpOnePage(v8::internal::NewSpace* space) {
// Helper function that simulates a fill new-space in the heap.
static inline void AllocateAllButNBytes(v8::internal::NewSpace* space,
int extra_bytes) {
- DisableInlineAllocationSteps(space);
+ space->DisableInlineAllocationSteps();
int space_remaining = static_cast<int>(*space->allocation_limit_address() -
*space->allocation_top_address());
CHECK(space_remaining >= extra_bytes);
« no previous file with comments | « src/heap/spaces.cc ('k') | test/cctest/test-spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698