cppgc: young-gen: Fix gcc and Bazel builds

Use class instead of lambda for static constexpr comparator (looks like
a bug in gcc).

Bug: chromium:1029379
Change-Id: I5caebacba2550bb206514f6e989d44361995f368
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484315
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79228}
This commit is contained in:
Anton Bikineev 2022-02-23 11:35:12 +01:00 committed by V8 LUCI CQ
parent c4712e8f7e
commit 2049390441
2 changed files with 8 additions and 6 deletions

View File

@ -2903,8 +2903,8 @@ filegroup(
"src/heap/cppgc/process-heap-statistics.h",
"src/heap/cppgc/raw-heap.cc",
"src/heap/cppgc/raw-heap.h",
"src/heap/cppgc/remembered-set.cc"
"src/heap/cppgc/remembered-set.h"
"src/heap/cppgc/remembered-set.cc",
"src/heap/cppgc/remembered-set.h",
"src/heap/cppgc/source-location.cc",
"src/heap/cppgc/stats-collector.cc",
"src/heap/cppgc/stats-collector.h",

View File

@ -48,10 +48,12 @@ class V8_EXPORT_PRIVATE OldToNewRememberedSet final {
private:
friend class MinorGCTest;
static constexpr auto compare_parameter = [](const WeakCallbackItem& lhs,
const WeakCallbackItem& rhs) {
return lhs.parameter < rhs.parameter;
};
static constexpr struct {
bool operator()(const WeakCallbackItem& lhs,
const WeakCallbackItem& rhs) const {
return lhs.parameter < rhs.parameter;
}
} compare_parameter{};
const HeapBase& heap_;
std::set<void*> remembered_slots_;