mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
LibJS/Bytecode: Make IdentifierTableIndex a 32-bit index
This makes a bunch of instructions smaller.
This commit is contained in:
parent
95759dcc6d
commit
37d722f4a6
Notes:
sideshowbarker
2024-07-17 05:02:35 +09:00
Author: https://github.com/awesomekling
Commit: 37d722f4a6
Pull-request: https://github.com/SerenityOS/serenity/pull/24240
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/trflynn89 ✅
3 changed files with 10 additions and 6 deletions
|
@ -12,7 +12,10 @@
|
|||
|
||||
namespace JS::Bytecode {
|
||||
|
||||
AK_TYPEDEF_DISTINCT_NUMERIC_GENERAL(size_t, IdentifierTableIndex, Comparison);
|
||||
struct IdentifierTableIndex {
|
||||
bool is_valid() const { return value != NumericLimits<u32>::max(); }
|
||||
u32 value { 0 };
|
||||
};
|
||||
|
||||
class IdentifierTable {
|
||||
AK_MAKE_NONMOVABLE(IdentifierTable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue