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

LibJS+LibJIT: Replace make_label() with default constructed label

This commit is contained in:
Simon Wanner 2023-10-28 20:17:16 +02:00 committed by Andreas Kling
parent ff265d1900
commit 202a08ecc2
2 changed files with 13 additions and 18 deletions

View file

@ -254,17 +254,12 @@ struct Assembler {
}
};
[[nodiscard]] Label make_label()
{
return Label {};
}
[[nodiscard]] Label jump()
{
// jmp target (RIP-relative 32-bit offset)
emit8(0xe9);
emit32(0xdeadbeef);
auto label = make_label();
Assembler::Label label {};
label.add_jump(*this, m_output.size());
return label;
}