[code-reflection] RFR: Conflicting code reflection fields for method overrides [v2]
Paul Sandoz
psandoz at openjdk.org
Fri Jun 28 16:28:32 UTC 2024
On Fri, 28 Jun 2024 16:17:38 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>>> Could we encode an instance of `MethodRef` in the field name like we do with the invoke operation's descriptor? (I believe there are less restrictions in the names of synthetic fields than ones that can be denoted in source.) That might be easier to manage on the compile time and run time sides.
>>
>> Are you asking if, instead of serializing the signature, we couldn't just (a) obtain the `MethodRef` object corresponding to the reflectable method and (b) add that to the synthetic field name? Seems possible, and probably provides a better way to pick that one up reflectively.
>
>> Seems possible, and probably provides a better way to pick that one up reflectively.
>
> Note that we might still have mismatches between the "source" signature of the method and the "classfile" one because of synthetic parameters. But maybe we can get there when we get there.
Yes, it was more in the spirit of a quicker fix with less mangling code.
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/162#discussion_r1658991621
More information about the babylon-dev
mailing list