Java 12: javac crash with switch expression containing try-catch-finally

B. Blaser bsrbnd at gmail.com
Mon Mar 25 14:59:48 UTC 2019


Hi Jan,

On Mon, 25 Mar 2019 at 14:27, Jan Lahoda <jan.lahoda at oracle.com> wrote:
>
> Hi Bernard,
>
> My current thinking is that we will need to restore the stack right
> before the final goto for the given break (which can be skipped if
> code.isAlive() == false).
>
> I've put my current patch here (incl. test) (I wasn't running other
> tests on this patch yet, though):
> http://cr.openjdk.java.net/~jlahoda/8220018/8220018
>
> This does not cover the switch expressions over booleans yet, that is
> something I am looking at right now.
>
> Jan

I was working on a similar solution as I found that my previous patch
wasn't working with 'try' within 'finally'. The solution, very close
to yours, was also handling conditional expressions which currently
doesn't seem to execute the 'finally' clause.
However, I still have a couple of failing tests... does your solution
pass all langtools:tier1?
Please, share it when covering conditional expressions too.

Bernard


More information about the compiler-dev mailing list