From 4d785b9aa0cbca1f6ce108a87d3232a58a2069bb Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 6 Feb 2022 16:30:10 +0100 Subject: [PATCH] LibJS: Mark Completion constructors with ALWAYS_INLINE These were showing up in profiles. --- Userland/Libraries/LibJS/Runtime/Completion.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/Completion.h b/Userland/Libraries/LibJS/Runtime/Completion.h index 1a10005608..94ac00eee2 100644 --- a/Userland/Libraries/LibJS/Runtime/Completion.h +++ b/Userland/Libraries/LibJS/Runtime/Completion.h @@ -26,7 +26,7 @@ public: Throw, }; - Completion(Type type, Optional value, Optional target) + ALWAYS_INLINE Completion(Type type, Optional value, Optional target) : m_type(type) , m_value(move(value)) , m_target(move(target)) @@ -39,11 +39,12 @@ public: // 5.2.3.1 Implicit Completion Values, https://tc39.es/ecma262/#sec-implicit-completion-values // Not `explicit` on purpose. - Completion(Value value) + ALWAYS_INLINE Completion(Value value) : Completion(Type::Normal, value, {}) { } - Completion() + + ALWAYS_INLINE Completion() : Completion(js_undefined()) { }