Skip to content

Commit

Permalink
fix exception flow control - update trap comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
A1K28 authored and swissiety committed Feb 6, 2025
1 parent 72c3fde commit 53bf37e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,12 @@ public void initializeWith(
}

private static int getTrapApplicationComparator(
HashMap<Stmt, Integer> trapstmtToIdx, Trap trapA, Trap trapB) {
if (trapA.getEndStmt() == trapB.getEndStmt()) {
HashMap<Stmt, Integer> trapstmtToIdx, Trap trapA, Trap trapB) {
if (trapA.getEndStmt() == trapB.getEndStmt() && trapA.getBeginStmt() == trapB.getBeginStmt()) {
final Integer idxA = trapstmtToIdx.get(trapA.getHandlerStmt());
final Integer idxB = trapstmtToIdx.get(trapB.getHandlerStmt());
return idxA - idxB;
} else if (trapA.getEndStmt() == trapB.getEndStmt()) {
final Integer startIdxA = trapstmtToIdx.get(trapA.getBeginStmt());
final Integer startIdxB = trapstmtToIdx.get(trapB.getBeginStmt());
return startIdxB - startIdxA;
Expand Down

0 comments on commit 53bf37e

Please sign in to comment.