[code-reflection] RFR: Replace use of MethodTypeDesc with FunctionType
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Feb 14 22:47:04 UTC 2024
On Wed, 14 Feb 2024 16:42:56 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
> wanted to deal with the reflective operations separately (including array operations in that category). It seems possible to determine the constructor from the parameter types and return type of a `MethodTypeDesc`
Not sure about that. There's two things going on: the type of the constructor (function type), and its symbol (MethodDesc). For non-generic classes, these two things will yield the same information (e.g. the "type" of a constructor MethodDesc is the same as the constructor's function type). But, in cases like:
class Box<X> { ... }
new Box<String>();
Here, the MethodDesc should say `Box::<init>` (and the type in this desc should be either `(X)V`, or `(Object)V`). But, the constructor's call function type should say `(String)V`.
-------------
PR Comment: https://git.openjdk.org/babylon/pull/22#issuecomment-1944882217
More information about the babylon-dev
mailing list