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:
parent
82828ad936
commit
d89e0b36d4
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