RFR of constants API

Brian Goetz brian.goetz at oracle.com
Thu May 17 15:43:11 UTC 2018


At this stage we are also happy to take Code review comments as well as API review.  

Sent from my MacBook Wheel

> On May 16, 2018, at 9:45 AM, Vicente Romero <vicente.romero at oracle.com> wrote:
> 
> I have uploaded an updated version of the webrev for the API [1] along with an updated version of the javadoc [2]. This is the change: class j.l.i.Intrinsics is not part of this API.
> 
> Thanks,
> Vicente
> 
> [1] http://cr.openjdk.java.net/~vromero/constant.api/webrev.04/
> [2] http://cr.openjdk.java.net/~vromero/constant.api/javadoc.04
> 
>> On 05/16/2018 08:39 AM, Brian Goetz wrote:
>> I’ve split this work off from JEP 303:
>>     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
>>> [2] 
>>> 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
>>> > [2] http://openjdk.java.net/jeps/303
>>> 
>> 
> 


More information about the amber-dev mailing list