mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 18:28:10 +00:00
LibJS: Fix not executing the expression of a return statement
This commit is contained in:
parent
a1e5711a27
commit
f286cf1792
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue