mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 18:00:16 +00:00
LibJS: Add JumpUndefined bytecode
This commit is contained in:
parent
3ee627909a
commit
f39ab2e60a
Notes:
sideshowbarker
2024-07-18 12:02:37 +09:00
Author: https://github.com/mattco98
Commit: f39ab2e60a
Pull-request: https://github.com/SerenityOS/serenity/pull/8033
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/awesomekling
4 changed files with 31 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue