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:
parent
73cf16f643
commit
a0412e0d5e
Notes:
sideshowbarker
2024-07-19 17:27:15 +09:00
Author: https://github.com/xyanrch 🔰
Commit: a0412e0d5e
Pull-request: https://github.com/SerenityOS/serenity/pull/7968
4 changed files with 31 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue