You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2022/07/26 14:59:00 UTC

[jira] [Updated] (GROOVY-10617) Return statement insertion generates unnecessary dynamic cast

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

Eric Milles updated GROOVY-10617:
---------------------------------
    Component/s: Compiler

> Return statement insertion generates unnecessary dynamic cast
> -------------------------------------------------------------
>
>                 Key: GROOVY-10617
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10617
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Minor
>              Labels: invokedynamic, performance
>             Fix For: 5.0.0-alpha-1
>
>
> Consider the following:
> {code:groovy}
> String m() {
>   // return null
> }
> {code}
> The null return is implicit (inserted by {{ReturnAdder}}) but also generates an invokedynamic cast instruction when the return type is anything besides Object.



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