1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-12 02:30:30 +09:00

LibJS: Implement bytecode generation for BreakStatement

This commit is contained in:
xyanrch 2021-06-10 20:28:43 +08:00 committed by Ali Mohammad Pur
parent 73cf16f643
commit a0412e0d5e
Notes: sideshowbarker 2024-07-19 17:27:15 +09:00
4 changed files with 31 additions and 3 deletions

View file

@ -62,5 +62,17 @@ void Generator::end_continuable_scope()
{
m_continuable_scopes.take_last();
}
Label Generator::nearest_breakable_scope() const
{
return m_breakable_scopes.last();
}
void Generator::begin_breakable_scope(Label breakable_target)
{
m_breakable_scopes.append(breakable_target);
}
void Generator::end_breakable_scope()
{
m_breakable_scopes.take_last();
}
}