mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-10 11:01:53 +00:00
LibJS: Always emit value in emit_named_evaluation_if_anonymous_function
There does not appear to be any case that we need to return an OptionalNone{}.
This commit is contained in:
parent
20dba8f1ab
commit
f2fb86abea
Notes:
github-actions[bot]
2025-05-23 01:26:59 +00:00
Author: https://github.com/shannonbooth
Commit: f2fb86abea
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4760
3 changed files with 15 additions and 16 deletions
|
@ -1090,7 +1090,7 @@ void Generator::emit_new_function(ScopedOperand dst, FunctionExpression const& f
|
|||
}
|
||||
}
|
||||
|
||||
CodeGenerationErrorOr<Optional<ScopedOperand>> Generator::emit_named_evaluation_if_anonymous_function(Expression const& expression, Optional<IdentifierTableIndex> lhs_name, Optional<ScopedOperand> preferred_dst)
|
||||
CodeGenerationErrorOr<ScopedOperand> Generator::emit_named_evaluation_if_anonymous_function(Expression const& expression, Optional<IdentifierTableIndex> lhs_name, Optional<ScopedOperand> preferred_dst)
|
||||
{
|
||||
if (is<FunctionExpression>(expression)) {
|
||||
auto const& function_expression = static_cast<FunctionExpression const&>(expression);
|
||||
|
@ -1106,7 +1106,7 @@ CodeGenerationErrorOr<Optional<ScopedOperand>> Generator::emit_named_evaluation_
|
|||
}
|
||||
}
|
||||
|
||||
return expression.generate_bytecode(*this, preferred_dst);
|
||||
return TRY(expression.generate_bytecode(*this, preferred_dst)).value();
|
||||
}
|
||||
|
||||
void Generator::emit_get_by_id(ScopedOperand dst, ScopedOperand base, IdentifierTableIndex property_identifier, Optional<IdentifierTableIndex> base_identifier)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue