mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-09 10:31:51 +00:00
LibJS: Make Op::Return value required
It turns out we do not have any scenario where this is not provided.
This commit is contained in:
parent
17364c6d36
commit
20dba8f1ab
Notes:
github-actions[bot]
2025-05-23 01:27:06 +00:00
Author: https://github.com/shannonbooth
Commit: 20dba8f1ab
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4760
3 changed files with 8 additions and 13 deletions
|
@ -3456,8 +3456,9 @@ Bytecode::CodeGenerationErrorOr<Optional<ScopedOperand>> ClassFieldInitializerSt
|
|||
{
|
||||
Bytecode::Generator::SourceLocationScope scope(generator, *this);
|
||||
auto value = TRY(generator.emit_named_evaluation_if_anonymous_function(*m_expression, generator.intern_identifier(m_class_field_identifier_name), preferred_dst));
|
||||
VERIFY(value.has_value());
|
||||
generator.perform_needed_unwinds<Bytecode::Op::Return>();
|
||||
generator.emit<Bytecode::Op::Return>(value.has_value() ? value->operand() : Optional<Operand> {});
|
||||
generator.emit<Bytecode::Op::Return>(value->operand());
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue