[code-reflection] RFR: Replace use of MethodTypeDesc with FunctionType [v3]

Paul Sandoz psandoz at openjdk.org
Wed Feb 14 23:07:03 UTC 2024


On Wed, 14 Feb 2024 19:59:30 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Replace use of `MethodTypeDesc` with `FunctionType` in the core API.
>> 
>> This pushes `MethodTypeDesc` more towards the reflective operation usages. There are convenience methods added to `MethodTypeDesc` for conversion/resolution between `FunctionType`. However, it may that the right approach here is convenience methods for conversion/resolution between `java.lang.invoke.MethodType` (or sequences of `Class<?>`) and `FunctionType`, which means we can likely remove `MethodTypeDesc`.
>
> Paul Sandoz has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update Triton PoC

It's as if there is a function that does the following:

C f(P1 p1, ..., PN pn) {
  return new C(p1, ..., pn);
}

or in your example:

Box<String>) f() {
  return new Box<String>();
}

We use the "type" of that function as an attribute of the new operation. I was hoping to generalize like that and then more specific details appear (as you indicate) as we interpret or lower to bytecode.

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

PR Comment: https://git.openjdk.org/babylon/pull/22#issuecomment-1944939944


More information about the babylon-dev mailing list