[heap] Fix GCC compilation
Using the constexpr {value()} accessor instead of the non-constexpr
implicit conversion operator makes GCC recognize the method as inlinable
again.
Before, we got (shortened):
heap/heap-allocator-inl.h:167:18: error: inlining failed in call to
always_inline ‘HeapAllocator::AllocateRaw’: function not inlinable
The issue was introduced by https://crrev.com/c/3683321.
R=mlippautz@chromium.org
Bug: v8:12887
Change-Id: I5879dc0afb23d1d5bb782bf9444703e9cba148f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688515
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80947}
diff --git a/src/heap/heap-allocator-inl.h b/src/heap/heap-allocator-inl.h
index 4bc6d25..06c4648 100644
--- a/src/heap/heap-allocator-inl.h
+++ b/src/heap/heap-allocator-inl.h
@@ -63,7 +63,7 @@
DCHECK(AllowHandleAllocation::IsAllowed());
DCHECK(AllowHeapAllocation::IsAllowed());
- if (FLAG_single_generation && type == AllocationType::kYoung) {
+ if (FLAG_single_generation.value() && type == AllocationType::kYoung) {
return AllocateRaw(size_in_bytes, AllocationType::kOld, origin, alignment);
}