[code-reflection] RFR: Address var name

Paul Sandoz psandoz at openjdk.org
Thu Sep 19 16:37:51 UTC 2024


On Thu, 19 Sep 2024 08:19:42 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:

> Address var name

src/java.base/share/classes/java/lang/reflect/code/op/CoreOp.java line 3948:

> 3946:      * Creates a var operation.
> 3947:      * <p>
> 3948:      * Null or empty string means unnamed variable

I recommend updating all three methods to state:

    Creates a var operation modeling a variable, either a local variable or a parameter.

Then we can add to the second two methods:

    If the given name is {@code null} or an empty string then the variable is an unnamed variable.

We can then update the first method (that accepts no name) to:

    Creates a var operation modeling an unnamed variable, either an unnamed local variable or an unnamed parameter.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/235#discussion_r1767159659


More information about the babylon-dev mailing list