mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 16:14:38 +00:00
LibJS: Fix not executing the expression of a return statement
This commit is contained in:
committed by
Andreas Kling
parent
a1e5711a27
commit
f286cf1792
@@ -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>();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user