mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
LibJS: Add basic support for "continue" in the bytecode VM
Unlike the convoluted unwind-until-scope-type mechanism in the AST interpreter, "continue" maps to a simple Bytecode::Op::Jump here. :^) We know where to jump based on a stack of "continuable scopes" that we now maintain on the Bytecode::Generator as we go. Note that this only supports bare "continue", not continue-with-label.
This commit is contained in:
parent
79eac08f5b
commit
4bdfe73895
4 changed files with 32 additions and 0 deletions
|
@ -1300,6 +1300,7 @@ public:
|
|||
}
|
||||
|
||||
virtual Value execute(Interpreter&, GlobalObject&) const override;
|
||||
virtual Optional<Bytecode::Register> generate_bytecode(Bytecode::Generator&) const override;
|
||||
|
||||
const FlyString& target_label() const { return m_target_label; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue