1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 04:05:07 +00:00

Revert "LibJS/Bytecode: Fuse [Not, JumpIf] instructions into JumpIfNot"

This reverts commit 795149e585.
This commit is contained in:
Andreas Kling 2024-03-06 08:04:29 +01:00
parent ea0b7192fa
commit c4a0afbe28
5 changed files with 0 additions and 53 deletions

View file

@ -38,20 +38,6 @@ void Peephole::perform(PassPipelineExecutable& executable)
if (next_instruction.type() == Instruction::Type::JumpIf) {
auto const& jump = static_cast<Op::JumpIf const&>(next_instruction);
if (instruction.type() == Instruction::Type::Not) {
auto const& not_ = static_cast<Op::Not const&>(instruction);
VERIFY(jump.condition() == not_.dst());
new_block->append<Op::JumpIfNot>(
not_.source_record().source_start_offset,
not_.source_record().source_end_offset,
not_.src(),
*jump.true_target(),
*jump.false_target());
++it;
VERIFY(it.at_end());
continue;
}
#define DO_FUSE_JUMP(PreOp, ...) \
if (instruction.type() == Instruction::Type::PreOp) { \
auto const& compare = static_cast<Op::PreOp const&>(instruction); \