1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-29 21:32:08 +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:
Andreas Kling 2020-09-22 16:18:51 +02:00
parent 676cb87a8f
commit d1b58ee9ad
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()