public void visitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo) { if (!mayThrowExceptions(clazz, method, codeAttribute, exceptionInfo.u2startPC, exceptionInfo.u2endPC)) { // Make the code block empty. exceptionInfo.u2endPC = exceptionInfo.u2startPC; if (extraExceptionInfoVisitor != null) { extraExceptionInfoVisitor.visitExceptionInfo(clazz, method, codeAttribute, exceptionInfo); } } }
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { // Go over the exception table. codeAttribute.exceptionsAccept(clazz, method, this); // Remove exceptions with empty code blocks. codeAttribute.u2exceptionTableLength = removeEmptyExceptions(codeAttribute.exceptionTable, codeAttribute.u2exceptionTableLength); }
new AllMethodVisitor( new AllAttributeVisitor( new UnreachableExceptionRemover(codeRemovalExceptionCounter))));
new DebugAttributeVisitor("Unreachable exception removal", new OptimizationCodeAttributeFilter( new UnreachableExceptionRemover(codeRemovalExceptionCounter)))))));
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { // Go over the exception table. codeAttribute.exceptionsAccept(clazz, method, this); // Remove exceptions with empty code blocks. codeAttribute.u2exceptionTableLength = removeEmptyExceptions(codeAttribute.exceptionTable, codeAttribute.u2exceptionTableLength); }
public void visitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo) { if (!mayThrowExceptions(clazz, method, codeAttribute, exceptionInfo.u2startPC, exceptionInfo.u2endPC)) { // Make the code block empty. exceptionInfo.u2endPC = exceptionInfo.u2startPC; if (extraExceptionInfoVisitor != null) { extraExceptionInfoVisitor.visitExceptionInfo(clazz, method, codeAttribute, exceptionInfo); } } }
new DebugAttributeVisitor("Unreachable exception removal", new OptimizationCodeAttributeFilter( new UnreachableExceptionRemover(codeRemovalExceptionCounter)))))));
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { // Go over the exception table. codeAttribute.exceptionsAccept(clazz, method, this); // Remove exceptions with empty code blocks. codeAttribute.u2exceptionTableLength = removeEmptyExceptions(codeAttribute.exceptionTable, codeAttribute.u2exceptionTableLength); }
public void visitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo) { if (!mayThrowExceptions(clazz, method, codeAttribute, exceptionInfo.u2startPC, exceptionInfo.u2endPC)) { // Make the code block empty. exceptionInfo.u2endPC = exceptionInfo.u2startPC; if (extraExceptionInfoVisitor != null) { extraExceptionInfoVisitor.visitExceptionInfo(clazz, method, codeAttribute, exceptionInfo); } } }
new DebugAttributeVisitor("Unreachable exception removal", new OptimizationCodeAttributeFilter( new UnreachableExceptionRemover(codeRemovalExceptionCounter)))))));
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { // Go over the exception table. codeAttribute.exceptionsAccept(clazz, method, this); // Remove exceptions with empty code blocks. codeAttribute.u2exceptionTableLength = removeEmptyExceptions(codeAttribute.exceptionTable, codeAttribute.u2exceptionTableLength); }
public void visitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo) { if (!mayThrowExceptions(clazz, method, codeAttribute, exceptionInfo.u2startPC, exceptionInfo.u2endPC)) { // Make the code block empty. exceptionInfo.u2endPC = exceptionInfo.u2startPC; if (extraExceptionInfoVisitor != null) { extraExceptionInfoVisitor.visitExceptionInfo(clazz, method, codeAttribute, exceptionInfo); } } }