LibJS: Add bytecode generation for EmptyStatement

This commit is contained in:
Gunnar Beutner 2021-06-07 20:47:26 +02:00 committed by Linus Groh
parent 2b8a2542a0
commit 9e69ffc1b1
2 changed files with 6 additions and 0 deletions

View file

@ -76,6 +76,7 @@ public:
{
}
Value execute(Interpreter&, GlobalObject&) const override { return {}; }
virtual Optional<Bytecode::Register> generate_bytecode(Bytecode::Generator&) const override;
};
class ErrorStatement final : public Statement {

View file

@ -27,6 +27,11 @@ Optional<Bytecode::Register> ScopeNode::generate_bytecode(Bytecode::Generator& g
return {};
}
Optional<Bytecode::Register> EmptyStatement::generate_bytecode(Bytecode::Generator&) const
{
return {};
}
Optional<Bytecode::Register> ExpressionStatement::generate_bytecode(Bytecode::Generator& generator) const
{
return m_expression->generate_bytecode(generator);