1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:07:35 +00:00

LibJS: Add JumpUndefined bytecode

This commit is contained in:
Matthew Olsson 2021-06-13 12:24:40 -07:00 committed by Andreas Kling
parent 3ee627909a
commit f39ab2e60a
4 changed files with 31 additions and 1 deletions

View file

@ -377,6 +377,17 @@ public:
String to_string_impl(Bytecode::Executable const&) const;
};
class JumpUndefined final : public Jump {
public:
explicit JumpUndefined(Optional<Label> true_target = {}, Optional<Label> false_target = {})
: Jump(Type::JumpUndefined, move(true_target), move(false_target))
{
}
void execute_impl(Bytecode::Interpreter&) const;
String to_string_impl(Bytecode::Executable const&) const;
};
// NOTE: This instruction is variable-width depending on the number of arguments!
class Call final : public Instruction {
public: