mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:17:46 +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
4 changed files with 69 additions and 28 deletions
|
@ -599,7 +599,7 @@ private:
|
|||
class NumericLiteral final : public Literal {
|
||||
public:
|
||||
explicit NumericLiteral(SourceRange source_range, double value)
|
||||
: Literal(move(source_range))
|
||||
: Literal(source_range)
|
||||
, m_value(value)
|
||||
{
|
||||
}
|
||||
|
@ -608,7 +608,7 @@ public:
|
|||
virtual void dump(int indent) const override;
|
||||
|
||||
private:
|
||||
double m_value { 0 };
|
||||
Value m_value;
|
||||
};
|
||||
|
||||
class BigIntLiteral final : public Literal {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue