Commit 620388b1 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[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/+/3688515Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80947}
parent 24a38eb3
...@@ -63,7 +63,7 @@ V8_WARN_UNUSED_RESULT V8_INLINE AllocationResult HeapAllocator::AllocateRaw( ...@@ -63,7 +63,7 @@ V8_WARN_UNUSED_RESULT V8_INLINE AllocationResult HeapAllocator::AllocateRaw(
DCHECK(AllowHandleAllocation::IsAllowed()); DCHECK(AllowHandleAllocation::IsAllowed());
DCHECK(AllowHeapAllocation::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); return AllocateRaw(size_in_bytes, AllocationType::kOld, origin, alignment);
} }
......
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