empty dfa stack when going to catch or finally in control flow

This commit is contained in:
peter
2012-04-18 12:07:42 +02:00
parent 304d46bb96
commit a58fdb1991
3 changed files with 15 additions and 0 deletions
@@ -642,6 +642,7 @@ class ControlFlowAnalyzer extends JavaElementVisitor {
pushUnknown();
final ConditionalGotoInstruction branch = new ConditionalGotoInstruction(-1, false, null);
addInstruction(branch);
addInstruction(new EmptyStackInstruction());
addInstruction(new GosubInstruction(cd.getJumpOffset()));
addInstruction(new ReturnInstruction());
branch.setOffset(myCurrentFlow.getInstructionCount());
@@ -651,6 +652,7 @@ class ControlFlowAnalyzer extends JavaElementVisitor {
pushUnknown();
final ConditionalGotoInstruction branch = new ConditionalGotoInstruction(-1, false, null);
addInstruction(branch);
addInstruction(new EmptyStackInstruction());
addInstruction(new PushInstruction(myFactory.getNotNullFactory().create(myRuntimeException), null));
addGotoCatch(cd);
branch.setOffset(myCurrentFlow.getInstructionCount());