Skip to content

Commit 93e0485

Browse files
authored
Merge pull request #86 from stg-tud/fix/merge-indirect-callees
Allow merging of indirect callee parameters if they are equal
2 parents dda4a09 + 84d8341 commit 93e0485

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/cg

OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/cg/Callees.scala

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,12 @@ sealed class ConcreteCallees(
299299
_incompleteCallSites ++ incompleteCallSites,
300300
_indirectCallReceivers.unionWith(
301301
indirectCallReceivers,
302-
(_, r, l) {
302+
(_, l, r) {
303303
r.unionWith(
304304
l,
305-
(_, _, _) throw new UnknownError("Indirect callee derived by two analyses")
305+
(_, vl, vr)
306+
if (vl == vr) vl
307+
else throw new UnknownError("Incompatible receivers for indirect call")
306308
)
307309
}
308310
),
@@ -311,7 +313,9 @@ sealed class ConcreteCallees(
311313
(_, r, l) {
312314
r.unionWith(
313315
l,
314-
(_, _, _) throw new UnknownError("Indirect callee derived by two analyses")
316+
(_, vl, vr)
317+
if (vl == vr) vl
318+
else throw new UnknownError("Incompatible parameters for indirect call")
315319
)
316320
}
317321
)

0 commit comments

Comments
 (0)