1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 14:44:58 +00:00

LibJS/Bytecode: Leave GlobalDeclarationInstantiation in C++

Don't try to implement this AO in bytecode. Instead, the bytecode
Interpreter class now has a run() API with the same inputs as the AST
interpreter. It sets up the necessary environments etc, including
invoking the GlobalDeclarationInstantiation AO.
This commit is contained in:
Andreas Kling 2023-06-15 12:36:57 +02:00
parent 32d9c8e3ca
commit d063f35afd
12 changed files with 172 additions and 284 deletions

View file

@ -60,7 +60,8 @@ CodeGenerationErrorOr<NonnullOwnPtr<Executable>> Generator::generate(ASTNode con
.string_table = move(generator.m_string_table),
.identifier_table = move(generator.m_identifier_table),
.number_of_registers = generator.m_next_register,
.is_strict_mode = is_strict_mode });
.is_strict_mode = is_strict_mode,
});
}
void Generator::grow(size_t additional_size)