From df365566406c310d36c3366864786d51f1c0b505 Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 14 May 1999 12:09:20 +0000 Subject: [PATCH] catchblock handles its local itself now git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@818 379699f6-c40d-0410-875b-85095c16579e --- .../jode/flow/TransformExceptionHandlers.java | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/jode/jode/flow/TransformExceptionHandlers.java b/jode/jode/flow/TransformExceptionHandlers.java index 5482731..99ba309 100644 --- a/jode/jode/flow/TransformExceptionHandlers.java +++ b/jode/jode/flow/TransformExceptionHandlers.java @@ -174,36 +174,8 @@ public class TransformExceptionHandlers { FlowBlock tryFlow, FlowBlock catchFlow) { StructuredBlock catchBlock = catchFlow.block; - LocalInfo local = null; - StructuredBlock firstInstr = (catchBlock instanceof SequentialBlock) - ? catchBlock.getSubBlocks()[0] : catchBlock; - - if (firstInstr instanceof SpecialBlock - && ((SpecialBlock) firstInstr).type == SpecialBlock.POP - && ((SpecialBlock) firstInstr).count == 1) { - /* The exception is ignored. Create a dummy local for it */ - local = new LocalInfo(); - local.setName("exception"); - firstInstr.removeBlock(); - - } else if (firstInstr instanceof InstructionBlock) { - Expression instr = - ((InstructionBlock) firstInstr).getInstruction(); - if (instr instanceof StoreInstruction - && (((StoreInstruction)instr).getLValue() - instanceof LocalStoreOperator)) { - /* The exception is stored in a local variable */ - local = ((LocalStoreOperator) - ((StoreInstruction)instr).getLValue()).getLocalInfo(); - firstInstr.removeBlock(); - } - } - - if (local != null) { - local.setType(type); - } - CatchBlock newBlock = new CatchBlock(type, local); + CatchBlock newBlock = new CatchBlock(type); ((TryBlock)tryFlow.block).addCatchBlock(newBlock); newBlock.setCatchBlock(catchFlow.block); tryFlow.mergeSuccessors(catchFlow);