Skip to content

Commit

Permalink
remove some redundant Label creation
Browse files Browse the repository at this point in the history
  • Loading branch information
adinn committed Nov 7, 2019
1 parent 05896f4 commit f0af3a6
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ public void visitTriggerEnd(Label label)
// we don't need a return or throw handler if we are in the scope of a monitor enter/exit pair
// all the handler regions end here so we use the same end label for all of them
Label end = new Label();
Label executeHandler = newLabel();
Label executeHandler = new Label();

if (!cfg.inOpenMonitor()) {
// ok this one needs the full set of handlers and the subtype handlers need to come first
Expand Down Expand Up @@ -970,24 +970,19 @@ public void visitMaxs(int maxStack, int maxLocals)
// saved exception then protect it with a try catch block and update
// the trigger details so that it is the target of this block

// generate a rethrow handler for each exception type

Label newStart = newLabel();
Label newEnd = newLabel();

// if we get here the return and throw handlers labels should be null
if (details.getEarlyReturnHandler() != null || details.getThrowHandler() != null) {
Helper.err("unexpected : trigger region with open monitorenters has subtype handler!");
}

// generate rethrow code and mark the handler as a try catch block for all
// three exception types
newStart = newLabel();
newEnd = newLabel();
Label newStart = newLabel();
Label newEnd = newLabel();
Label newEarlyReturn = newLabel();
Label newThrow = newLabel();
visitLabel(details.getExecuteHandler());
Label newExecute = newLabel();
visitLabel(details.getExecuteHandler());
visitLabel(newStart);
while (openEnters.hasNext()) {
CodeLocation enterLocation = openEnters.next();
Expand Down

0 comments on commit f0af3a6

Please sign in to comment.