From b05b9378eda15aaee4a91974950b9c6dbd17e4b7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 4 Apr 2025 23:23:39 +0200 Subject: [PATCH] LibJS: Demote VERIFYs in Completion() to ASSERT These were *extremely* hot in profiles (noticed when looking at disassembly). Now that we've made the special empty JS::Value much harder to create accidentally, we can feel better about turning these into ASSERT and catching them in debug builds. --- Libraries/LibJS/Runtime/Completion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/LibJS/Runtime/Completion.h b/Libraries/LibJS/Runtime/Completion.h index 01f7b2126d2..0650a7feb5b 100644 --- a/Libraries/LibJS/Runtime/Completion.h +++ b/Libraries/LibJS/Runtime/Completion.h @@ -64,8 +64,8 @@ public: : m_type(type) , m_value(value) { - VERIFY(type != Type::Empty); - VERIFY(!value.is_special_empty_value()); + ASSERT(type != Type::Empty); + ASSERT(!value.is_special_empty_value()); } Completion(ThrowCompletionOr const&);