LibJS: Mark Value::to_numeric_slow_case() COLD

to_numeric() will have already handled the sane case where the value was
some kind of number.
This commit is contained in:
Andreas Kling 2025-12-05 10:40:38 +01:00 committed by Andreas Kling
parent f4fb3f99c8
commit 6dbae3a6dd
2 changed files with 2 additions and 2 deletions

View file

@ -665,7 +665,7 @@ ThrowCompletionOr<GC::Ref<Object>> Value::to_object_slow(VM& vm) const
}
// 7.1.3 ToNumeric ( value ), https://tc39.es/ecma262/#sec-tonumeric
FLATTEN ThrowCompletionOr<Value> Value::to_numeric_slow_case(VM& vm) const
ThrowCompletionOr<Value> Value::to_numeric_slow_case(VM& vm) const
{
// OPTIMIZATION: Fast paths for some trivial common cases.
if (is_boolean()) {

View file

@ -425,7 +425,7 @@ public:
private:
ThrowCompletionOr<Value> to_number_slow_case(VM&) const;
ThrowCompletionOr<Value> to_numeric_slow_case(VM&) const;
COLD ThrowCompletionOr<Value> to_numeric_slow_case(VM&) const;
ThrowCompletionOr<Value> to_primitive_slow_case(VM&, PreferredType) const;
enum class EmptyTag { Empty };