1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

LibJS: Move initialize_instance_elements() from VM to Object

This makes more sense as an Object method rather than living within the
VM class for no good reason. Most of the other 7.3.xx AOs already work
the same way.
Also add spec comments while we're here.
This commit is contained in:
Linus Groh 2022-12-07 00:22:23 +00:00
parent cdeaced54e
commit daec065fde
7 changed files with 25 additions and 16 deletions

View file

@ -678,7 +678,7 @@ ThrowCompletionOr<void> SuperCall::execute_impl(Bytecode::Interpreter& interpret
// NOTE: This is implied by the strong C++ type.
// 11. Perform ? InitializeInstanceElements(result, F).
TRY(vm.initialize_instance_elements(*result, f));
TRY(result->initialize_instance_elements(f));
// 12. Return result.
interpreter.accumulator() = result;