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:
Andreas Kling 2020-09-22 16:18:51 +02:00
parent 676cb87a8f
commit d1b58ee9ad
Notes: sideshowbarker 2024-07-19 02:16:35 +09:00
20 changed files with 60 additions and 52 deletions

View file

@ -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()