Commit 3c2a6933 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[cleanup] Remove redundant ROUND_UP macro

Replace all uses by the existing RoundUp function.

R=ulan@chromium.org

Bug: v8:7570
Change-Id: I7ff5e76ebea7b429ff4e4f3a8157ee831e7891ae
Reviewed-on: https://chromium-review.googlesource.com/1004898Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52525}
parent 2e8a9872
......@@ -274,10 +274,6 @@ constexpr int kUC16Size = sizeof(uc16); // NOLINT
// 128 bit SIMD value size.
constexpr int kSimd128Size = 16;
// Round up n to be a multiple of sz, where sz is a power of 2.
#define ROUND_UP(n, sz) (((n) + ((sz) - 1)) & ~((sz) - 1))
// FUNCTION_ADDR(f) gets the address of a C function f.
#define FUNCTION_ADDR(f) \
(reinterpret_cast<v8::internal::Address>(reinterpret_cast<intptr_t>(f)))
......
......@@ -4009,7 +4009,7 @@ bool Heap::ConfigureHeap(size_t max_semi_space_size_in_kb,
// Overwrite default configuration.
if (max_semi_space_size_in_kb != 0) {
max_semi_space_size_ =
ROUND_UP(max_semi_space_size_in_kb * KB, Page::kPageSize);
RoundUp<Page::kPageSize>(max_semi_space_size_in_kb * KB);
}
if (max_old_generation_size_in_mb != 0) {
max_old_generation_size_ = max_old_generation_size_in_mb * MB;
......@@ -4025,9 +4025,9 @@ bool Heap::ConfigureHeap(size_t max_semi_space_size_in_kb,
}
if (Page::kPageSize > MB) {
max_semi_space_size_ = ROUND_UP(max_semi_space_size_, Page::kPageSize);
max_semi_space_size_ = RoundUp<Page::kPageSize>(max_semi_space_size_);
max_old_generation_size_ =
ROUND_UP(max_old_generation_size_, Page::kPageSize);
RoundUp<Page::kPageSize>(max_old_generation_size_);
}
if (FLAG_stress_compaction) {
......@@ -4059,7 +4059,7 @@ bool Heap::ConfigureHeap(size_t max_semi_space_size_in_kb,
}
} else {
initial_semispace_size_ =
ROUND_UP(initial_semispace_size, Page::kPageSize);
RoundUp<Page::kPageSize>(initial_semispace_size);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment