Commit 4b25eaef authored by Anton Bikineev's avatar Anton Bikineev Committed by V8 LUCI CQ

cppgc: Force inline Member

With pointer compression enabled the compiler may not inline some Member
functions on some platforms, because Member stores and loads become
slightly more expensive. Inlining is however important with pointer
compression - it allows to further optimize the code by eliminating
the global load.

Bug: chromium:1325007
Change-Id: Ia37d223e78853a8218e0b2732a3f08aa58929000
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3756141Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81648}
parent 126d4779
......@@ -27,11 +27,11 @@ class WeakMemberTag;
class UntracedMemberTag;
struct DijkstraWriteBarrierPolicy {
static void InitializingBarrier(const void*, const void*) {
V8_INLINE static void InitializingBarrier(const void*, const void*) {
// Since in initializing writes the source object is always white, having no
// barrier doesn't break the tri-color invariant.
}
static void AssigningBarrier(const void* slot, const void* value) {
V8_INLINE static void AssigningBarrier(const void* slot, const void* value) {
WriteBarrier::Params params;
switch (WriteBarrier::GetWriteBarrierType(slot, value, params)) {
case WriteBarrier::Type::kGenerational:
......@@ -48,8 +48,8 @@ struct DijkstraWriteBarrierPolicy {
};
struct NoWriteBarrierPolicy {
static void InitializingBarrier(const void*, const void*) {}
static void AssigningBarrier(const void*, const void*) {}
V8_INLINE static void InitializingBarrier(const void*, const void*) {}
V8_INLINE static void AssigningBarrier(const void*, const void*) {}
};
class V8_EXPORT SameThreadEnabledCheckingPolicyBase {
......@@ -90,7 +90,7 @@ class V8_EXPORT SameThreadEnabledCheckingPolicy
class DisabledCheckingPolicy {
protected:
void CheckPointer(const void*) {}
V8_INLINE void CheckPointer(const void*) {}
};
#ifdef DEBUG
......
This diff is collapsed.
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