Withdrawn: 8276836: Error in javac caused by switch expression without result expressions: Internal error: stack sim error

duke duke at openjdk.java.net
Wed Jan 26 22:13:38 UTC 2022


On Thu, 11 Nov 2021 13:47:17 GMT, Guoxiong Li <gli at openjdk.org> wrote:

> Hi all,
> 
> The method `Gen#visitSwitchExpression` will switch code generation off by using the method `Code#markDead` when it meets the code like `throw new RuntimeException()`. Then the method `Gen#completeBinop` won't generate the expected code and wiil let the left operand stay in the stack without handling it.
> 
> This patch pops the left operand from the stack to solve this issue. And the corresponding test is added.
> 
> Thanks for taking the time to review.
> 
> Best Regards,
> -- Guoxiong

This pull request has been closed without being integrated.

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

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


More information about the compiler-dev mailing list