1
Fork 0
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:
Ali Mohammad Pur 2022-03-13 16:01:18 +03:30 committed by Andreas Kling
parent 57386ca839
commit 2000251333
5 changed files with 38 additions and 0 deletions

View file

@ -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)