mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-03 06:39:07 +00:00
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:
parent
739cc4b8dc
commit
00018ad415
Notes:
sideshowbarker
2024-07-16 21:51:02 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 00018ad415
Pull-request: https://github.com/SerenityOS/serenity/pull/24272
2 changed files with 14 additions and 14 deletions
|
@ -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 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue