Skip to content

Commit

Permalink
Merge pull request #86 from stg-tud/fix/merge-indirect-callees
Browse files Browse the repository at this point in the history
Allow merging of indirect callee parameters if they are equal
  • Loading branch information
errt authored Apr 1, 2021
2 parents dda4a09 + 84d8341 commit 93e0485
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,12 @@ sealed class ConcreteCallees(
_incompleteCallSites ++ incompleteCallSites,
_indirectCallReceivers.unionWith(
indirectCallReceivers,
(_, r, l) {
(_, l, r) {
r.unionWith(
l,
(_, _, _) throw new UnknownError("Indirect callee derived by two analyses")
(_, vl, vr)
if (vl == vr) vl
else throw new UnknownError("Incompatible receivers for indirect call")
)
}
),
Expand All @@ -311,7 +313,9 @@ sealed class ConcreteCallees(
(_, r, l) {
r.unionWith(
l,
(_, _, _) throw new UnknownError("Indirect callee derived by two analyses")
(_, vl, vr)
if (vl == vr) vl
else throw new UnknownError("Incompatible parameters for indirect call")
)
}
)
Expand Down

0 comments on commit 93e0485

Please sign in to comment.