[ 
https://issues.apache.org/jira/browse/GROOVY-12035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Sun updated GROOVY-12035:
--------------------------------
    Description: StatementWriter.writeIfElse currently emits GOTO exitPath 
unconditionally whenever an else branch exists. If the if branch is already 
non-fallthrough (e.g., return, throw, or nested abrupt control flow), that jump 
is unreachable and introduces dead bytecode in the generated method.

> Avoid emitting unreachable GOTO in if/else bytecode generation
> --------------------------------------------------------------
>
>                 Key: GROOVY-12035
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12035
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Daniel Sun
>            Priority: Major
>
> StatementWriter.writeIfElse currently emits GOTO exitPath unconditionally 
> whenever an else branch exists. If the if branch is already non-fallthrough 
> (e.g., return, throw, or nested abrupt control flow), that jump is 
> unreachable and introduces dead bytecode in the generated method.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to