1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 09:28:13 +00:00

LibWasm: ALWAYS_INLINE some very hot functions

These function couldn't be inlined before because the compiler would've
started flagging invalid paths in Variant as maybe-uninitialized.
This commit is contained in:
Ali Mohammad Pur 2021-06-09 20:31:07 +04:30 committed by Ali Mohammad Pur
parent d3db45c60b
commit aa2916c21b
3 changed files with 17 additions and 14 deletions

View file

@ -472,10 +472,10 @@ public:
Stack() = default;
[[nodiscard]] ALWAYS_INLINE bool is_empty() const { return m_data.is_empty(); }
FLATTEN void push(EntryType entry) { m_data.append(move(entry)); }
FLATTEN auto pop() { return m_data.take_last(); }
FLATTEN auto& peek() const { return m_data.last(); }
FLATTEN auto& peek() { return m_data.last(); }
ALWAYS_INLINE void push(EntryType entry) { m_data.append(move(entry)); }
ALWAYS_INLINE auto pop() { return m_data.take_last(); }
ALWAYS_INLINE auto& peek() const { return m_data.last(); }
ALWAYS_INLINE auto& peek() { return m_data.last(); }
ALWAYS_INLINE auto size() const { return m_data.size(); }
ALWAYS_INLINE auto& entries() const { return m_data; }