mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibJS: Generate bytecode for throw statements
This commit is contained in:
committed by
Andreas Kling
parent
e9bafd768d
commit
b78f1c1261
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2021, Gunnar Beutner <gbeutner@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
@@ -668,4 +669,10 @@ void UpdateExpression::generate_bytecode(Bytecode::Generator& generator) const
|
||||
TODO();
|
||||
}
|
||||
|
||||
void ThrowStatement::generate_bytecode(Bytecode::Generator& generator) const
|
||||
{
|
||||
m_argument->generate_bytecode(generator);
|
||||
generator.emit<Bytecode::Op::Throw>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user