RFR: 8271254: javac generates unreachable code when using empty semicolon statement [v2]

Vicente Romero vromero at openjdk.java.net
Tue Sep 14 13:38:14 UTC 2021


On Tue, 14 Sep 2021 05:36:34 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
>
> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove the new parameter

looks good

-------------

Marked as reviewed by vromero (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5495


More information about the compiler-dev mailing list