[code-reflection] RFR: Conversion of java.lang.invoke to Class-File API

Paul Sandoz psandoz at openjdk.org
Fri Jun 28 16:11:27 UTC 2024


On Thu, 27 Jun 2024 17:02:49 GMT, Adam Sotona <asotona at openjdk.org> wrote:

> Last merge from JDK master excluded java.lang.invoke package conversion.
> This patch adds the missing conversion of java.lang.invoke package from ASM to Class-File API.

This looks good. I just focused on `InnerClassLMF.class` as I believe that is where most (or all) the Babylon specific changes are.

While you are modifying j.l.invoke classes could you also update the JavaDoc of `LMF.altMetafactory`:


     * <pre>{@code
     *  CallSite altMetafactory(MethodHandles.Lookup caller,
     *                          String interfaceMethodName,
     *                          MethodType factoryType,
     *                          MethodType interfaceMethodType,
     *                          MethodHandle implementation,
     *                          MethodType dynamicMethodType,
     *                          int flags,
     *                          int altInterfaceCount,        // IF flags has MARKERS set
     *                          Class... altInterfaces,       // IF flags has MARKERS set
     *                          int altMethodCount,           // IF flags has BRIDGES set
     *                          MethodType... altMethods      // IF flags has BRIDGES set
     *                          MethodType reflectType        // IF flags has QUOTABLE set
     *                          MethodHandle reflectField     // IF flags has QUOTABLE set
     *                          )


Remove the `reflectType` parameter, and change `reflectField` to `quotableField`.

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

Marked as reviewed by psandoz (Lead).

PR Review: https://git.openjdk.org/babylon/pull/161#pullrequestreview-2148396341


More information about the babylon-dev mailing list