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

@ -75,7 +75,7 @@ void MathObject::initialize(GlobalObject& global_object)
define_property("SQRT1_2", Value(M_SQRT1_2), 0);
define_property("SQRT2", Value(M_SQRT2), 0);
define_property(global_object.interpreter().well_known_symbol_to_string_tag(), js_string(global_object.heap(), "Math"), Attribute::Configurable);
define_property(global_object.vm().well_known_symbol_to_string_tag(), js_string(global_object.heap(), "Math"), Attribute::Configurable);
}
MathObject::~MathObject()