scala/scala — pull request #2169 by JamesIry (2013-02-25 22:06:39+00:00)
Title: SI-7181 Eliminate unnecessary duplicates of finally blocks

SI-7181 Eliminate unnecessary duplicates of finally blocks
The main body of a try and each exception handler were getting a copy of
the finally block for the "normal" flow case (i.e. where they don't
throw an uncaught exception or use "return" to exit early). But that's
not necessary.

With this commit the try body and each exception handler can all jump
to the same copy of the finally block on a normal exit.

Two tests are included. One is a run style test that shows that
try/catch/finally logic remains unchanged. The other is a byte code
test that ensures we're getting fewer copies of the finally.

A second commit adds more comments and does some slight renaming to clarify the structure involved. It's kept as a separate commit to make the reviewer's job easier.