mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:47:35 +00:00
LibJS: Rename m_global_symbol_map to m_global_symbol_registry
The spec calls it "GlobalSymbolRegistry".
This commit is contained in:
parent
112b3f7342
commit
2c579ed0df
2 changed files with 5 additions and 4 deletions
|
@ -224,7 +224,7 @@ void VM::gather_roots(HashTable<Cell*>& roots)
|
|||
JS_ENUMERATE_WELL_KNOWN_SYMBOLS
|
||||
#undef __JS_ENUMERATE
|
||||
|
||||
for (auto& symbol : m_global_symbol_map)
|
||||
for (auto& symbol : m_global_symbol_registry)
|
||||
roots.set(symbol.value);
|
||||
|
||||
for (auto* finalization_registry : m_finalization_registry_cleanup_jobs)
|
||||
|
@ -233,12 +233,12 @@ void VM::gather_roots(HashTable<Cell*>& roots)
|
|||
|
||||
Symbol* VM::get_global_symbol(DeprecatedString const& description)
|
||||
{
|
||||
auto result = m_global_symbol_map.get(description);
|
||||
auto result = m_global_symbol_registry.get(description);
|
||||
if (result.has_value())
|
||||
return result.value();
|
||||
|
||||
auto new_global_symbol = js_symbol(*this, description, true);
|
||||
m_global_symbol_map.set(description, new_global_symbol);
|
||||
m_global_symbol_registry.set(description, new_global_symbol);
|
||||
return new_global_symbol;
|
||||
}
|
||||
|
||||
|
|
|
@ -264,7 +264,8 @@ private:
|
|||
|
||||
StackInfo m_stack_info;
|
||||
|
||||
HashMap<DeprecatedString, Symbol*> m_global_symbol_map;
|
||||
// GlobalSymbolRegistry, https://tc39.es/ecma262/#table-globalsymbolregistry-record-fields
|
||||
HashMap<DeprecatedString, Symbol*> m_global_symbol_registry;
|
||||
|
||||
Vector<Function<ThrowCompletionOr<Value>()>> m_promise_jobs;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue