Skip to content

Commit

Permalink
fix MutableBlockStmtGraph.insertBefore() : indexing of Stmt->Block wa…
Browse files Browse the repository at this point in the history
…s missing
  • Loading branch information
swissiety committed Sep 15, 2023
1 parent 38b9734 commit 443db38
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,11 @@ public void insertBefore(
(type, handler) ->
successorBlock.addExceptionalSuccessorBlock(type, getOrCreateBlock(handler)));
stmts.forEach(stmt -> addNodeToBlock(block, stmt));
tryMergeBlocks(block, successorBlock);
if (!tryMergeBlocks(block, successorBlock)) {
// update index: for splitted stmts
successorBlock.getStmts().forEach((stmt) -> stmtToBlock.put(stmt, successorBlock));
blocks.add(successorBlock);
}
}

if (beforeStmt == getStartingStmt()) {
Expand Down

0 comments on commit 443db38

Please sign in to comment.