Skip to content

Commit

Permalink
Put post logic before blocks' rethrow instruction, if present.
Browse files Browse the repository at this point in the history
Temporary fix for #3577. The longer term fix will be to make the
instruction insert logic in AddCallProtocol less sensitive to the
contents of exit blocks.
headius committed Jan 6, 2016
1 parent 8994d95 commit f9c2c97
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -152,7 +152,7 @@ public Object execute(IRScope scope, Object... data) {
i = instrs.next();
// Breaks & non-local returns in blocks will throw exceptions
// and pops for them will be handled in the GEB
if (!bb.isExitBB() && i instanceof ReturnInstr) {
if (!bb.isExitBB() && i instanceof ReturnInstr || i instanceof RethrowSavedExcInLambdaInstr) {
if (requireBinding) fixReturn(scope, (ReturnInstr)i, instrs);
// Add before the break/return
instrs.previous();

0 comments on commit f9c2c97

Please sign in to comment.