mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
LibJS: Fix not executing the expression of a return statement
This commit is contained in:
parent
a1e5711a27
commit
f286cf1792
Notes:
sideshowbarker
2024-07-18 12:35:42 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/f286cf17926 Pull-request: https://github.com/SerenityOS/serenity/pull/7930
@ -401,6 +401,8 @@ void CallExpression::generate_bytecode(Bytecode::Generator& generator) const
|
||||
|
||||
void ReturnStatement::generate_bytecode(Bytecode::Generator& generator) const
|
||||
{
|
||||
if (m_argument)
|
||||
m_argument->generate_bytecode(generator);
|
||||
generator.emit<Bytecode::Op::Return>();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user