mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:45:06 +00:00
LibJS: Move well-known symbols to the VM
No need to instantiate unique symbols for each Interpreter; they can be VM-global. This reduces the memory cost and startup time anyway.
This commit is contained in:
parent
676cb87a8f
commit
d1b58ee9ad
20 changed files with 60 additions and 52 deletions
|
@ -45,6 +45,11 @@ Symbol* js_symbol(Heap& heap, String description, bool is_global)
|
|||
return heap.allocate_without_global_object<Symbol>(move(description), is_global);
|
||||
}
|
||||
|
||||
Symbol* js_symbol(VM& vm, String description, bool is_global)
|
||||
{
|
||||
return js_symbol(vm.heap(), move(description), is_global);
|
||||
}
|
||||
|
||||
Symbol* js_symbol(Interpreter& interpreter, String description, bool is_global)
|
||||
{
|
||||
return js_symbol(interpreter.heap(), description, is_global);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue