1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 17:15: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

@ -41,7 +41,7 @@ Object* get_iterator(GlobalObject& global_object, Value value, String hint, Valu
auto object = value.to_object(interpreter, global_object);
if (!object)
return {};
method = object->get(interpreter.well_known_symbol_iterator());
method = object->get(global_object.vm().well_known_symbol_iterator());
if (interpreter.exception())
return {};
}