mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:17:44 +00:00
LibJS/Bytecode: Add fast paths for equality checks with same-tag values
This commit is contained in:
parent
795149e585
commit
55e9df4954
2 changed files with 22 additions and 4 deletions
|
@ -131,6 +131,8 @@ public:
|
|||
Number,
|
||||
};
|
||||
|
||||
[[nodiscard]] u16 tag() const { return m_value.tag; }
|
||||
|
||||
bool is_empty() const { return m_value.tag == EMPTY_TAG; }
|
||||
bool is_undefined() const { return m_value.tag == UNDEFINED_TAG; }
|
||||
bool is_null() const { return m_value.tag == NULL_TAG; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue