[code-reflection] RFR: Invocation to vararg methods [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Sep 10 23:56:13 UTC 2024


On Tue, 10 Sep 2024 20:54:48 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> We don't need to in all cases - only required for super invocations. I just chose a path of least resistance when hacking it together. My main motivation was to avoid updating all the tests! Varargs calls are less common so I was not overly concerned about the scary strings.
>> 
>> But, for consistency I think it is worth addressing this. If `invoke.varargs` is present and `invoke.kind` is not we can infer static or instance invocation.
>
> Actually there was a reason, that i forgot about. Let's say we have a method `A::m(A... more)` we know it is varargs but don't know if it's a static or instance method. Given one operand we cannot differentiate between `a.m()` and `m(a)`.

ugh - ok :-)

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

PR Review Comment: https://git.openjdk.org/babylon/pull/225#discussion_r1752943820


More information about the babylon-dev mailing list