RFR: 8271254: javac generates unreachable code when using empty semicolon statement [v2]
Guoxiong Li
gli at openjdk.java.net
Tue Sep 14 05:36:34 UTC 2021
> 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
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/5495/files
- new: https://git.openjdk.java.net/jdk/pull/5495/files/0f6f3cdd..f9c870c8
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5495&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5495&range=00-01
Stats: 5 lines in 1 file changed: 1 ins; 1 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/5495.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/5495/head:pull/5495
PR: https://git.openjdk.java.net/jdk/pull/5495
More information about the compiler-dev
mailing list