From b821356ba66b0915d96a114fb10f67ddaefa4ccb Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 6 Dec 2022 21:02:06 +0000 Subject: [PATCH] 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. --- Userland/Libraries/LibJS/Runtime/VM.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibJS/Runtime/VM.h b/Userland/Libraries/LibJS/Runtime/VM.h index 9e88ccc7a3..ff3022444c 100644 --- a/Userland/Libraries/LibJS/Runtime/VM.h +++ b/Userland/Libraries/LibJS/Runtime/VM.h @@ -168,6 +168,9 @@ public: StackInfo const& stack_info() const { return m_stack_info; }; + HashMap> const& global_symbol_registry() const { return m_global_symbol_registry; } + HashMap>& global_symbol_registry() { return m_global_symbol_registry; } + u32 execution_generation() const { return m_execution_generation; } void finish_execution_generation() { ++m_execution_generation; }