mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:27:45 +00:00
LibJS: Flatten Value::to_numeric()
The basic idea here is to inline to_primitive() to get rid of the function call overhead.
This commit is contained in:
parent
00965e3dad
commit
6870349599
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
auto primitive = to_primitive(global_object, Value::PreferredType::Number);
|
||||||
if (global_object.vm().exception())
|
if (global_object.vm().exception())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue