mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibJS: Implement bytecode generation for For-In/Of statements
This also implements the rather interesting behaviour that #12772 relies on, so this fixes that bug in BC mode (the AST interp remains affected).
This commit is contained in:
parent
83afc1154c
commit
8f7021faf7
Notes:
sideshowbarker
2024-07-17 17:07:51 +09:00
Author: https://github.com/alimpfard
Commit: 8f7021faf7
Pull-request: https://github.com/SerenityOS/serenity/pull/13116
Reviewed-by: https://github.com/Lubrsi
6 changed files with 454 additions and 15 deletions
|
@ -894,6 +894,7 @@ public:
|
|||
Statement const& body() const { return *m_body; }
|
||||
|
||||
virtual Completion execute(Interpreter&, GlobalObject&) const override;
|
||||
virtual Bytecode::CodeGenerationErrorOr<void> generate_bytecode(Bytecode::Generator&) const override;
|
||||
virtual Completion loop_evaluation(Interpreter&, GlobalObject&, Vector<FlyString> const&) const override;
|
||||
virtual void dump(int indent) const override;
|
||||
|
||||
|
@ -918,6 +919,7 @@ public:
|
|||
Statement const& body() const { return *m_body; }
|
||||
|
||||
virtual Completion execute(Interpreter&, GlobalObject&) const override;
|
||||
virtual Bytecode::CodeGenerationErrorOr<void> generate_bytecode(Bytecode::Generator&) const override;
|
||||
virtual Completion loop_evaluation(Interpreter&, GlobalObject&, Vector<FlyString> const&) const override;
|
||||
virtual void dump(int indent) const override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue