From 6870349599fa9a62e456d2ab85c4d2685df91192 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 21 Mar 2021 18:13:29 +0100 Subject: [PATCH] LibJS: Flatten Value::to_numeric() The basic idea here is to inline to_primitive() to get rid of the function call overhead. --- Userland/Libraries/LibJS/Runtime/Value.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/Value.cpp b/Userland/Libraries/LibJS/Runtime/Value.cpp index e5b362984c..c5467eb300 100644 --- a/Userland/Libraries/LibJS/Runtime/Value.cpp +++ b/Userland/Libraries/LibJS/Runtime/Value.cpp @@ -413,7 +413,7 @@ Object* Value::to_object(GlobalObject& global_object) const } } -Value Value::to_numeric(GlobalObject& global_object) const +FLATTEN Value Value::to_numeric(GlobalObject& global_object) const { auto primitive = to_primitive(global_object, Value::PreferredType::Number); if (global_object.vm().exception())