Skip to content

Commit

Permalink
Merge branch 'm-opt' of github.com:MarcMil/soot into m-opt
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcMil committed Dec 6, 2021
2 parents 9dd2602 + 6a46190 commit 378bdd7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -882,13 +882,16 @@ protected void processVirtualEdgeSummary(SootMethod callSiteMethod, Stmt callSit
// addVirtualCallSite() may change receiverToSites, which may lead to a ConcurrentModificationException
// I'm not entirely sure whether we ought to deal with the new call sites that are being added, instead of
// just working on a snapshot, though.
List<VirtualCallSite> indirectSites = new ArrayList<>(receiverToSites.get(targetLocal));
for (final VirtualCallSite site : indirectSites) {
if (w.getTargetMethod().equals(site.subSig())) {
for (VirtualEdgeTarget siteTarget : w.getTargets()) {
Stmt siteStmt = site.getStmt();
if (siteStmt.containsInvokeExpr()) {
processVirtualEdgeSummary(callSiteMethod, callSite, siteStmt, receiver, siteTarget, edgeType);

List<VirtualCallSite> indirectSites = receiverToSites.get(targetLocal);
if (indirectSites != null) {
for (final VirtualCallSite site : new ArrayList<>(indirectSites)) {
if (w.getTargetMethod().equals(site.subSig())) {
for (VirtualEdgeTarget siteTarget : w.getTargets()) {
Stmt siteStmt = site.getStmt();
if (siteStmt.containsInvokeExpr()) {
processVirtualEdgeSummary(callSiteMethod, callSite, siteStmt, receiver, siteTarget, edgeType);
}
}
}
}
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/soot/jimple/toolkits/typing/fast/TypeUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,15 @@ public static int getValueBitSize(Type type) {
if (type instanceof DoubleType) {
return 64;
}

if (type instanceof Integer127Type) {
return 8;
}
if (type instanceof Integer32767Type) {
return 16;
}
if (type instanceof Integer1Type) {
return 1;
}
throw new IllegalArgumentException(type + " not supported.");
}

Expand Down

0 comments on commit 378bdd7

Please sign in to comment.