mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Split Value::Type::Number into Int32 and Double
We now store 32-bit integers as 32-bit integers directly which avoids having to convert them from doubles when they're only used as 32-bit integers anyway. :^) This patch feels a bit incomplete and there's a lot of opportunities to take advantage of this information. We'll have to find and exploit them eventually.
This commit is contained in:
parent
630d83be8f
commit
c8382c32e9
Notes:
sideshowbarker
2024-07-18 21:11:03 +09:00
Author: https://github.com/awesomekling
Commit: c8382c32e9
4 changed files with 69 additions and 28 deletions
|
@ -729,7 +729,8 @@ Value UnaryExpression::execute(Interpreter& interpreter, GlobalObject& global_ob
|
|||
// yes, this is on purpose. yes, this is how javascript works.
|
||||
// yes, it's silly.
|
||||
return js_string(vm, "object");
|
||||
case Value::Type::Number:
|
||||
case Value::Type::Int32:
|
||||
case Value::Type::Double:
|
||||
return js_string(vm, "number");
|
||||
case Value::Type::String:
|
||||
return js_string(vm, "string");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue