1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:47:44 +00:00

AK+LibJS: Remove OFFSET_OF and its users

With the LibJS JIT removed, let's not expose pointers to internal
members.
This commit is contained in:
Timothy Flynn 2024-02-28 13:08:15 -05:00 committed by Andreas Kling
parent 4646a87eba
commit d878975f95
14 changed files with 0 additions and 53 deletions

View file

@ -318,9 +318,6 @@ public:
}
}
static FlatPtr value_offset() { return OFFSET_OF(Optional, m_storage); }
static FlatPtr has_value_offset() { return OFFSET_OF(Optional, m_has_value); }
private:
alignas(T) u8 m_storage[sizeof(T)];
bool m_has_value { false };

View file

@ -16,8 +16,6 @@
#include <AK/Assertions.h>
#define OFFSET_OF(class, member) __builtin_offsetof(class, member)
namespace AK {
template<typename T, typename U>

View file

@ -811,8 +811,6 @@ public:
AK::swap(at(i), at(size() - i - 1));
}
static FlatPtr outline_buffer_offset() { return OFFSET_OF(Vector, m_outline_buffer); }
private:
void reset_capacity()
{

View file

@ -42,8 +42,6 @@ public:
void revoke() { m_ptr = nullptr; }
static FlatPtr ptr_offset() { return OFFSET_OF(WeakLink, m_ptr); }
private:
template<typename T>
explicit WeakLink(T& weakable)