mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:48:13 +00:00
LibJS: Implement bytecode generation for WithStatement
This commit is contained in:
parent
57386ca839
commit
2000251333
5 changed files with 38 additions and 0 deletions
|
@ -303,6 +303,18 @@ private:
|
|||
EnvironmentMode m_mode { EnvironmentMode::Lexical };
|
||||
};
|
||||
|
||||
class EnterObjectEnvironment final : public Instruction {
|
||||
public:
|
||||
explicit EnterObjectEnvironment()
|
||||
: Instruction(Type::EnterObjectEnvironment)
|
||||
{
|
||||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
String to_string_impl(Bytecode::Executable const&) const;
|
||||
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
|
||||
};
|
||||
|
||||
class CreateVariable final : public Instruction {
|
||||
public:
|
||||
explicit CreateVariable(IdentifierTableIndex identifier, EnvironmentMode mode, bool is_immutable)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue