LibJS/Bytecode: Make IdentifierTableIndex a 32-bit index

This makes a bunch of instructions smaller.
This commit is contained in:
Andreas Kling 2024-05-06 10:12:02 +02:00
commit 37d722f4a6
Notes: sideshowbarker 2024-07-17 05:02:35 +09:00
3 changed files with 10 additions and 6 deletions

View file

@ -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);