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

LibJS/Bytecode: Support class field initializers

Fixes 513 test262 tests. :^)
This commit is contained in:
Andreas Kling 2023-06-17 10:11:23 +02:00
parent 82828ad936
commit d89e0b36d4
3 changed files with 49 additions and 36 deletions

View file

@ -2593,4 +2593,13 @@ Bytecode::CodeGenerationErrorOr<void> MetaProperty::generate_bytecode(Bytecode::
VERIFY_NOT_REACHED();
}
Bytecode::CodeGenerationErrorOr<void> ClassFieldInitializerStatement::generate_bytecode(Bytecode::Generator& generator) const
{
TRY(m_expression->generate_bytecode(generator));
generator.perform_needed_unwinds<Bytecode::Op::Return>();
generator.emit<Bytecode::Op::Return>();
return {};
}
}