InvokeOperator (method interpreter): Fixed call to ClassInfo.forName.

TransformExceptionHandlers:  Fixed a bug regarding call to removeBadJSR.


git-svn-id: https://svn.code.sf.net/p/jode/code/branches/branch_1_1@1306 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
hoenicke 24 years ago
parent dbacfa1c7e
commit f1cee9fca4
  1. 10
      jode/ChangeLog
  2. 6
      jode/jode/expr/InvokeOperator.java.in
  3. 2
      jode/jode/flow/TransformExceptionHandlers.java.in

@ -1,3 +1,13 @@
2001-02-05 Jochen Hoenicke <jochen@gnu.org>
* jode/expr/InvokeOperator.java.in (Environment.invokeMethod):
Fixed the call to ClassInfo.forName: it expects a class name, while
ref.getClazz() gives a type signature.
* jode/flow/TransformExceptionHandlers.java.in:
(checkAndRemoveJSR): Only invoke removeBadJSR, if there are
successors left.
(checkAndRemoveMonitorExit): likewise.
2001-02-04 Jochen Hoenicke <jochen@gnu.org> 2001-02-04 Jochen Hoenicke <jochen@gnu.org>
* jode/expr/IfThenElseOperator.java (simplify): Allow in the class$ * jode/expr/IfThenElseOperator.java (simplify): Allow in the class$

@ -419,8 +419,10 @@ public final class InvokeOperator extends Operator
Object cls, Object[] params) Object cls, Object[] params)
throws InterpreterException, InvocationTargetException { throws InterpreterException, InvocationTargetException {
if (cls == null && ref.getClazz().equals(classSig)) { if (cls == null && ref.getClazz().equals(classSig)) {
BytecodeInfo info = String clazzName = ref.getClazz();
ClassInfo.forName(ref.getClazz()) clazzName = clazzName.substring(1, ref.getClazz().length() - 1)
.replace('/', '.');
BytecodeInfo info = ClassInfo.forName(clazzName)
.findMethod(ref.getName(), ref.getType()) .findMethod(ref.getName(), ref.getType())
.getBytecode(); .getBytecode();
if (info != null) if (info != null)

@ -387,6 +387,7 @@ public class TransformExceptionHandlers {
} }
} }
} }
if (tryFlow.getSuccessors().contains(subRoutine))
removeBadJSR(tryFlow, catchBlock, subRoutine); removeBadJSR(tryFlow, catchBlock, subRoutine);
} }
@ -505,6 +506,7 @@ public class TransformExceptionHandlers {
} }
if (subRoutine != null) { if (subRoutine != null) {
if (tryFlow.getSuccessors().contains(subRoutine))
removeBadJSR(tryFlow, catchBlock, subRoutine); removeBadJSR(tryFlow, catchBlock, subRoutine);
tryFlow.mergeAddr(subRoutine); tryFlow.mergeAddr(subRoutine);
} }

Loading…
Cancel
Save