LibJS: Move BindingPattern bytecode generation into a method

Preparation for upcoming function where binding pattern will have to be
used outside of ASTCodegen.cpp
This commit is contained in:
Aliaksandr Kalenik 2024-05-09 05:00:07 +00:00 committed by Andreas Kling
commit 00018ad415
Notes: sideshowbarker 2024-07-16 21:51:02 +09:00
2 changed files with 14 additions and 14 deletions

View file

@ -18,6 +18,7 @@
#include <LibJS/Bytecode/CodeGenerationError.h>
#include <LibJS/Bytecode/Executable.h>
#include <LibJS/Bytecode/IdentifierTable.h>
#include <LibJS/Bytecode/Op.h>
#include <LibJS/Bytecode/Operand.h>
#include <LibJS/Bytecode/ScopedOperand.h>
#include <LibJS/Forward.h>
@ -646,6 +647,8 @@ struct BindingPattern : RefCounted<BindingPattern> {
bool contains_expression() const;
Bytecode::CodeGenerationErrorOr<void> generate_bytecode(Bytecode::Generator&, Bytecode::Op::SetVariable::InitializationMode initialization_mode, Bytecode::ScopedOperand const& object, bool create_variables) const;
Vector<BindingEntry> entries;
Kind kind { Kind::Object };
};