Integrated: 8271254: javac generates unreachable code when using empty semicolon statement
Guoxiong Li
gli at openjdk.java.net
Tue Sep 14 14:50:10 UTC 2021
On Mon, 13 Sep 2021 15:26:38 GMT, Guoxiong Li <gli at openjdk.org> wrote:
> Hi all,
>
> The method `Gen#genTry` is used by `visitTry` and `visitSynchronized`, but `genTry` can't identify who is invoking it so that it can't solve the concrete issues about try statement or synchronized statement separately. This patch adds a new parameter `actualTry` to identify the concrete situation( try or synchronized) and fixes this issue about using empty skip statement in the try statement body. And some related test cases are added.
>
> Thanks for taking the time to review.
>
> Best Regards,
> -- Guoxiong
This pull request has now been integrated.
Changeset: fe89dd3b
Author: Guoxiong Li <gli at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/fe89dd3b0d47807c7dbfe24d17f6aca152fc8908
Stats: 101 lines in 2 files changed: 92 ins; 0 del; 9 mod
8271254: javac generates unreachable code when using empty semicolon statement
Reviewed-by: vromero
-------------
PR: https://git.openjdk.java.net/jdk/pull/5495
More information about the compiler-dev
mailing list