mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibWasm: Inline some very hot functions
These are mostly pretty small functions too, and they were about ~10% of runtime.
This commit is contained in:
parent
bacf5a7220
commit
70b94f58b2
Notes:
sideshowbarker
2024-07-18 08:54:46 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/70b94f58b26
2 changed files with 6 additions and 6 deletions
|
@ -130,26 +130,26 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
Value(Value const& value)
|
||||
ALWAYS_INLINE Value(Value const& value)
|
||||
: m_value(AnyValueType { value.m_value })
|
||||
, m_type(value.m_type)
|
||||
{
|
||||
}
|
||||
|
||||
Value(Value&& value)
|
||||
ALWAYS_INLINE Value(Value&& value)
|
||||
: m_value(move(value.m_value))
|
||||
, m_type(move(value.m_type))
|
||||
{
|
||||
}
|
||||
|
||||
Value& operator=(Value&& value)
|
||||
ALWAYS_INLINE Value& operator=(Value&& value)
|
||||
{
|
||||
m_value = move(value.m_value);
|
||||
m_type = move(value.m_type);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Value& operator=(Value const& value)
|
||||
ALWAYS_INLINE Value& operator=(Value const& value)
|
||||
{
|
||||
m_value = value.m_value;
|
||||
m_type = value.m_type;
|
||||
|
@ -157,7 +157,7 @@ public:
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
Optional<T> to()
|
||||
ALWAYS_INLINE Optional<T> to()
|
||||
{
|
||||
Optional<T> result;
|
||||
m_value.visit(
|
||||
|
|
|
@ -50,7 +50,7 @@ protected:
|
|||
T read_value(ReadonlyBytes data);
|
||||
|
||||
Vector<Value> pop_values(Configuration& configuration, size_t count);
|
||||
bool trap_if_not(bool value, StringView reason)
|
||||
ALWAYS_INLINE bool trap_if_not(bool value, StringView reason)
|
||||
{
|
||||
if (!value)
|
||||
m_trap = Trap { reason };
|
||||
|
|
Loading…
Reference in a new issue