RFR of constants API
Brian Goetz
brian.goetz at oracle.com
Wed May 16 12:39:05 UTC 2018
I’ve split this work off from JEP 303:
https://bugs.openjdk.java.net/browse/JDK-8203252 <https://bugs.openjdk.java.net/browse/JDK-8203252>
> On May 15, 2018, at 5:36 PM, Vicente Romero <vicente.romero at oracle.com> wrote:
>
> note: forwarding to amber-dev, also I forgot adding that this work was done under JEP 303 but will be put back under its own JEP earlier than 303.
>
> Hi all,
> I've run javadoc [1] for the three following packages: java.lang,
> java.lang.invoke, and the new java.lang.invoke.constant. The highlights:
>
> - java.lang.invoke.constant: The ConstantDesc hierarchy, which models
> "descriptors" for constant values. (Interfaces in the ConstantDesc
> hierarchy correspond to the various kinds of constant pool entry in JVMS
> 4.4. Just as the JVM resolves a constant pool entry in order to yield a
> value, you can ask a ConstantDesc object to resolve itself in order to
> yield the value "described" by the object.) Also, the factory interface
> Constable, which an ordinary class can implement in order to map its
> constant values to descriptors.
>
> - java.lang.invoke: MethodHandle, MethodType, and VarHandle implement
> Constable. Also, new types that model type descriptors, field
> descriptors, and method descriptors from JVMS 4.3. Also, the Intrinsics
> class with methods to instruct the compiler to generate `ldc` and
> `invokedynamic` bytecodes.
>
> - java.lang: Class, String, Integer, etc implement Constable. Also,
> Class implements j.l.i.FieldTypeDescriptor. Also, String, Integer, etc
> implement ConstantDesc.
>
> Also as a reference [2] is the last webrev.
>
> Thanks,
> Vicente
>
>
> [1]
> http://cr.openjdk.java.net/~vromero/constant.api/javadoc.03/java.base-summary.html <http://cr.openjdk.java.net/~vromero/constant.api/javadoc.03/java.base-summary.html>
> [2]
> http://cr.openjdk.java.net/~vromero/constant.api/webrev.03/constants.api.patch <http://cr.openjdk.java.net/~vromero/constant.api/webrev.03/constants.api.patch>
>
> On 04/27/2018 01:31 PM, Vicente Romero wrote:
> > Hi all,
> >
> > Please review the current proposal of the constants API, which are
> > nominal descriptor types defined in pkg java.lang.invoke.constant. The
> > code can be found at [1]. This API is being developed in the context
> > of JEP 303: Intrinsics for the LDC and INVOKEDYNAMIC Instructions [2]
> >
> > Thanks in advance for your comments,
> > Vicente
> >
> > [1] http://cr.openjdk.java.net/~vromero/constant.api/webrev.00 <http://cr.openjdk.java.net/~vromero/constant.api/webrev.00>
> > [2] http://openjdk.java.net/jeps/303 <http://openjdk.java.net/jeps/303>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20180516/835752c4/attachment.html>
More information about the amber-spec-experts
mailing list