mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-17 07:50:04 +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:
parent
c38f051bf7
commit
1fb4471506
Notes:
sideshowbarker
2024-07-18 12:15:40 +09:00
Author: https://github.com/gunnarbeutner
Commit: 1fb4471506
Pull-request: https://github.com/SerenityOS/serenity/pull/8044
Reviewed-by: https://github.com/alimpfard
2 changed files with 23 additions and 20 deletions
|
@ -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 \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue