mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
LibJS/Bytecode: Remove BlockBoundaryType::LeaveVariableEnvironment
We never need to manually exit a var environment from bytecode anymore.
This commit is contained in:
parent
ac246d764d
commit
12ce0789da
2 changed files with 0 additions and 14 deletions
|
@ -315,9 +315,6 @@ void Generator::generate_break()
|
|||
case LeaveLexicalEnvironment:
|
||||
emit<Bytecode::Op::LeaveEnvironment>(Bytecode::Op::EnvironmentMode::Lexical);
|
||||
break;
|
||||
case LeaveVariableEnvironment:
|
||||
emit<Bytecode::Op::LeaveEnvironment>(Bytecode::Op::EnvironmentMode::Var);
|
||||
break;
|
||||
case Continue:
|
||||
break;
|
||||
case ReturnToFinally: {
|
||||
|
@ -345,8 +342,6 @@ void Generator::generate_break(DeprecatedFlyString const& break_label)
|
|||
last_was_finally = false;
|
||||
} else if (boundary == BlockBoundaryType::LeaveLexicalEnvironment) {
|
||||
emit<Bytecode::Op::LeaveEnvironment>(Bytecode::Op::EnvironmentMode::Lexical);
|
||||
} else if (boundary == BlockBoundaryType::LeaveVariableEnvironment) {
|
||||
emit<Bytecode::Op::LeaveEnvironment>(Bytecode::Op::EnvironmentMode::Var);
|
||||
} else if (boundary == BlockBoundaryType::ReturnToFinally) {
|
||||
auto& block = make_block(DeprecatedString::formatted("{}.break", current_block().name()));
|
||||
emit<Op::ScheduleJump>(Label { block });
|
||||
|
@ -388,9 +383,6 @@ void Generator::generate_continue()
|
|||
case LeaveLexicalEnvironment:
|
||||
emit<Bytecode::Op::LeaveEnvironment>(Bytecode::Op::EnvironmentMode::Lexical);
|
||||
break;
|
||||
case LeaveVariableEnvironment:
|
||||
emit<Bytecode::Op::LeaveEnvironment>(Bytecode::Op::EnvironmentMode::Var);
|
||||
break;
|
||||
case Break:
|
||||
break;
|
||||
case ReturnToFinally: {
|
||||
|
@ -418,8 +410,6 @@ void Generator::generate_continue(DeprecatedFlyString const& continue_label)
|
|||
last_was_finally = false;
|
||||
} else if (boundary == BlockBoundaryType::LeaveLexicalEnvironment) {
|
||||
emit<Bytecode::Op::LeaveEnvironment>(Bytecode::Op::EnvironmentMode::Lexical);
|
||||
} else if (boundary == BlockBoundaryType::LeaveVariableEnvironment) {
|
||||
emit<Bytecode::Op::LeaveEnvironment>(Bytecode::Op::EnvironmentMode::Var);
|
||||
} else if (boundary == BlockBoundaryType::ReturnToFinally) {
|
||||
auto& block = make_block(DeprecatedString::formatted("{}.continue", current_block().name()));
|
||||
emit<Op::ScheduleJump>(Label { block });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue