mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +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
Notes:
sideshowbarker
2024-07-19 02:16:35 +09:00
Author: https://github.com/awesomekling
Commit: d1b58ee9ad
20 changed files with 60 additions and 52 deletions
|
@ -49,7 +49,7 @@ void JSONObject::initialize(GlobalObject& global_object)
|
|||
define_native_function("stringify", stringify, 3, attr);
|
||||
define_native_function("parse", parse, 2, attr);
|
||||
|
||||
define_property(global_object.interpreter().well_known_symbol_to_string_tag(), js_string(global_object.heap(), "JSON"), Attribute::Configurable);
|
||||
define_property(global_object.vm().well_known_symbol_to_string_tag(), js_string(global_object.heap(), "JSON"), Attribute::Configurable);
|
||||
}
|
||||
|
||||
JSONObject::~JSONObject()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue