diff --git a/Userland/Libraries/LibJS/JIT/Compiler.cpp b/Userland/Libraries/LibJS/JIT/Compiler.cpp index 705de343b0..7d13d8adb6 100644 --- a/Userland/Libraries/LibJS/JIT/Compiler.cpp +++ b/Userland/Libraries/LibJS/JIT/Compiler.cpp @@ -175,7 +175,7 @@ void Compiler::compile_jump(Bytecode::Op::Jump const& op) static bool cxx_to_boolean(VM&, Value value) { - return value.to_boolean(); + return value.to_boolean_slow_case(); } void Compiler::compile_to_boolean(Assembler::Reg dst, Assembler::Reg src) diff --git a/Userland/Libraries/LibJS/Runtime/Value.h b/Userland/Libraries/LibJS/Runtime/Value.h index c08e6b090a..f5ee193f65 100644 --- a/Userland/Libraries/LibJS/Runtime/Value.h +++ b/Userland/Libraries/LibJS/Runtime/Value.h @@ -439,8 +439,9 @@ public: return static_cast(m_value.encoded & 0xFFFFFFFF); } -private: bool to_boolean_slow_case() const; + +private: ThrowCompletionOr to_number_slow_case(VM&) const; ThrowCompletionOr to_numeric_slow_case(VM&) const; ThrowCompletionOr to_primitive_slow_case(VM&, PreferredType) const;