LibJS: Add const/non-const VM::global_symbol_registry() getters

This will allow us to replace the strange get_global_symbol() API that
creates symbols on the fly when not found.
This commit is contained in:
Linus Groh 2022-12-06 21:02:06 +00:00
commit b821356ba6
Notes: sideshowbarker 2024-07-17 03:41:55 +09:00

View file

@ -168,6 +168,9 @@ public:
StackInfo const& stack_info() const { return m_stack_info; };
HashMap<DeprecatedString, NonnullGCPtr<Symbol>> const& global_symbol_registry() const { return m_global_symbol_registry; }
HashMap<DeprecatedString, NonnullGCPtr<Symbol>>& global_symbol_registry() { return m_global_symbol_registry; }
u32 execution_generation() const { return m_execution_generation; }
void finish_execution_generation() { ++m_execution_generation; }