branchAnalysis.setupVisitorForClass(jclass);
XMethod createXMethod = XFactory.createXMethod(jclass, method);
if (!(createXMethod instanceof MethodInfo)) {
return null;
}
MethodInfo xMethod = (MethodInfo) createXMethod;
int iteration = 1;
OpcodeStack myStack = branchAnalysis.stack;
/*
if (false) {
myStack.learnFrom(myStack.getJumpInfoFromStackMap());
}
*/
do {
if (DEBUG && iteration > 1 ) {
System.out.println("Iterative jump info for " + xMethod +", iteration " + iteration);
myStack.printJumpEntries();
System.out.println();
}
// myStack.resetForMethodEntry0(ClassName.toSlashedClassName(jclass.getClassName()), method);
branchAnalysis.doVisitMethod(method);
if (xMethod.hasBackBranch() != myStack.backwardsBranch && !myStack.encountedTop) {
AnalysisContext.logError(
String.format("For %s, mismatch on existence of backedge: %s for precomputation, %s for bytecode analysis",
xMethod, xMethod.hasBackBranch(), myStack.backwardsBranch));
}
if (iteration++ > 40) {
AnalysisContext.logError("Iterative jump info didn't converge after " + iteration + " iterations in " + xMethod
+ ", size " + method.getCode().getLength());
break;