mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 23:59:49 +00:00
LibJS/Bytecode: Support class field initializers
Fixes 513 test262 tests. :^)
This commit is contained in:
parent
82828ad936
commit
d89e0b36d4
Notes:
sideshowbarker
2024-07-17 11:30:54 +09:00
Author: https://github.com/awesomekling
Commit: d89e0b36d4
Pull-request: https://github.com/SerenityOS/serenity/pull/19434
3 changed files with 49 additions and 36 deletions
|
@ -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 {};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue