Skip to content

Commit

Permalink
Update to Error Prone 2.36.0 (#1469)
Browse files Browse the repository at this point in the history
The new
[DuplicateBranches](https://errorprone.info/bugpattern/DuplicateBranches)
check caught some cases which I tried to comment out more clearly for
readability.
  • Loading branch information
msridhar authored Nov 22, 2024
1 parent ee5f071 commit b99a80f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,14 @@ public void setPhi(final SSAValue value, SSAInstruction setBy) {
info("Closing free SSA Value {} in scope {}", param.value, param.setInScope);
param.status = ValueStatus.FREE_CLOSED;
}
} else if (param.setInScope < currentScope) {
// param.status = ValueStatus.INVALIDATED;
} else {
// TODO: NO! I JUST WANTED TO ADD THEM! *grrr*
// error("MISSING PHI for "
// throw new IllegalStateException("You forgot Phis in subordinate blocks");
}
// else if (param.setInScope < currentScope) {
// // param.status = ValueStatus.INVALIDATED;
// } else {
// // TODO: NO! I JUST WANTED TO ADD THEM! *grrr*
// // error("MISSING PHI for "
// // throw new IllegalStateException("You forgot Phis in subordinate blocks");
// }
}
assert didPhi;
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,14 @@ public void setPhi(TypeReference type, int ssaValue, SSAInstruction setBy) {

param.status = ValueStatus.FREE_CLOSED;
}
} else if (param.setInScope < currentScope) {
// param.status = ValueStatus.INVALIDATED;
} else {
// TODO: NO! I JUST WANTED TO ADD THEM! *grrr*
// logger.error("MISSING PHI for "
// throw new IllegalStateException("You forgot Phis in subordinate blocks");
}
// else if (param.setInScope < currentScope) {
// // param.status = ValueStatus.INVALIDATED;
// } else {
// // TODO: NO! I JUST WANTED TO ADD THEM! *grrr*
// // logger.error("MISSING PHI for "
// // throw new IllegalStateException("You forgot Phis in subordinate blocks");
// }
}
assert didPhi;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ public void collectParameters(final Iterable<? extends Entrypoint> entrypoints)
private static int ssaFor(IMethod inCallTo, int paramNo) {
assert (paramNo >= 0);
assert (paramNo < inCallTo.getNumberOfParameters());

if (inCallTo.isStatic()) {
return paramNo + 1;
} else {
return paramNo + 1; // TODO 2 or 1?
}
return paramNo + 1;
// if (inCallTo.isStatic()) {
// return paramNo + 1;
// } else {
// return paramNo + 1; // TODO 2 or 1?
// }
}

/**
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ eclipse-ecj = "org.eclipse.jdt:ecj:3.37.0"
eclipse-osgi = "org.eclipse.platform:org.eclipse.osgi:3.19.0"
eclipse-wst-jsdt-core = { module = "org.eclipse.wst.jsdt:core", version.ref = "eclipse-wst-jsdt" }
eclipse-wst-jsdt-ui = { module = "org.eclipse.wst.jsdt:ui", version.ref = "eclipse-wst-jsdt" }
errorprone-core = "com.google.errorprone:error_prone_core:2.35.1"
errorprone-core = "com.google.errorprone:error_prone_core:2.36.0"
gradle-download-task = "de.undercouch:gradle-download-task:5.6.0"
gradle-errorprone-plugin = "net.ltgt.gradle:gradle-errorprone-plugin:4.1.0"
gradle-goomph-plugin = "com.diffplug.gradle:goomph:3.44.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import com.ibm.wala.ipa.callgraph.CGNode;
import com.ibm.wala.ipa.callgraph.Context;
import com.ibm.wala.ipa.callgraph.ContextKey;
import com.ibm.wala.ipa.callgraph.propagation.AllocationSite;
import com.ibm.wala.ipa.callgraph.propagation.AllocationSiteInNode;
import com.ibm.wala.ipa.callgraph.propagation.ConstantKey;
import com.ibm.wala.ipa.callgraph.propagation.InstanceKey;
Expand Down Expand Up @@ -170,11 +169,12 @@ public PrefixTransferGraph(PointerAnalysis<InstanceKey> pa) {
// }
}
}
} else if (k instanceof AllocationSite) {

} else {

}
// else if (k instanceof AllocationSite) {
//
// } else {
//
// }
// create an edge for dependencies used in the creation of each instance key
} else {

Expand Down

0 comments on commit b99a80f

Please sign in to comment.