瀏覽代碼

LibJS: Mark Completion constructors with ALWAYS_INLINE

These were showing up in profiles.
Andreas Kling 3 年之前
父節點
當前提交
4d785b9aa0
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      Userland/Libraries/LibJS/Runtime/Completion.h

+ 4 - 3
Userland/Libraries/LibJS/Runtime/Completion.h

@@ -26,7 +26,7 @@ public:
         Throw,
         Throw,
     };
     };
 
 
-    Completion(Type type, Optional<Value> value, Optional<FlyString> target)
+    ALWAYS_INLINE Completion(Type type, Optional<Value> value, Optional<FlyString> target)
         : m_type(type)
         : m_type(type)
         , m_value(move(value))
         , m_value(move(value))
         , m_target(move(target))
         , m_target(move(target))
@@ -39,11 +39,12 @@ public:
 
 
     // 5.2.3.1 Implicit Completion Values, https://tc39.es/ecma262/#sec-implicit-completion-values
     // 5.2.3.1 Implicit Completion Values, https://tc39.es/ecma262/#sec-implicit-completion-values
     // Not `explicit` on purpose.
     // Not `explicit` on purpose.
-    Completion(Value value)
+    ALWAYS_INLINE Completion(Value value)
         : Completion(Type::Normal, value, {})
         : Completion(Type::Normal, value, {})
     {
     {
     }
     }
-    Completion()
+
+    ALWAYS_INLINE Completion()
         : Completion(js_undefined())
         : Completion(js_undefined())
     {
     {
     }
     }