1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:18:11 +00:00

LibRegex: Use a plain array to store opcodes

Using a hash map is unnecessary because the number of opcodes and their
IDs never change.
This commit is contained in:
Gunnar Beutner 2021-06-13 22:10:25 +02:00 committed by Ali Mohammad Pur
parent c38f051bf7
commit 1fb4471506
2 changed files with 23 additions and 20 deletions

View file

@ -450,7 +450,8 @@ private:
}
ALWAYS_INLINE OpCode* get_opcode_by_id(OpCodeId id) const;
static HashMap<u32, OwnPtr<OpCode>> s_opcodes;
static OwnPtr<OpCode> s_opcodes[(size_t)OpCodeId::Last + 1];
static bool s_opcodes_initialized;
};
#define ENUMERATE_EXECUTION_RESULTS \