mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
LibJS/Bytecode: Replace merged block references before copying them
This commit is contained in:
parent
1f9d76c7b8
commit
0b8d2fb62f
1 changed files with 2 additions and 2 deletions
|
@ -135,6 +135,8 @@ void MergeBlocks::perform(PassPipelineExecutable& executable)
|
|||
|
||||
auto new_block = BasicBlock::create(builder.build(), size);
|
||||
auto& block = *new_block;
|
||||
auto first_successor_position = replace_blocks(successors, *new_block);
|
||||
VERIFY(first_successor_position.has_value());
|
||||
|
||||
size_t last_successor_index = successors.size() - 1;
|
||||
for (size_t i = 0; i < successors.size(); ++i) {
|
||||
|
@ -152,8 +154,6 @@ void MergeBlocks::perform(PassPipelineExecutable& executable)
|
|||
block.grow(copy_end);
|
||||
}
|
||||
|
||||
auto first_successor_position = replace_blocks(successors, *new_block);
|
||||
VERIFY(first_successor_position.has_value());
|
||||
executable.executable.basic_blocks.insert(*first_successor_position, move(new_block));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue