mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
LibJS: Move global symbol map from SymbolObject to Interpreter
This allows different instances of the Interpreter to have their own global symbols. Also makes Symbol non-copyable and non-moveable.
This commit is contained in:
parent
4d8683b632
commit
d9db6bec42
6 changed files with 48 additions and 115 deletions
|
@ -111,6 +111,10 @@ public:
|
|||
|
||||
Reference get_reference(const FlyString& name);
|
||||
|
||||
Symbol* get_global_symbol(const String& description);
|
||||
Symbol* get_well_known_symbol(const String& description) const;
|
||||
const HashMap<String, Symbol*>& get_well_known_symbol_map(Badge<SymbolConstructor>) const { return m_well_known_symbol_map; };
|
||||
|
||||
void gather_roots(Badge<Heap>, HashTable<Cell*>&);
|
||||
|
||||
void enter_scope(const ScopeNode&, ArgumentVector, ScopeType, GlobalObject&);
|
||||
|
@ -217,6 +221,9 @@ private:
|
|||
|
||||
Object* m_global_object { nullptr };
|
||||
|
||||
HashMap<String, Symbol*> m_well_known_symbol_map;
|
||||
HashMap<String, Symbol*> m_global_symbol_map;
|
||||
|
||||
Exception* m_exception { nullptr };
|
||||
|
||||
ScopeType m_unwind_until { ScopeType::None };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue