Kind of related but not really, I’ve filed a bug against ConstantPool to add 
JSR 292 “support”:

JDK-8077229: sun.reflect.ConstantPool should support class and method constant 
pools
https://bugs.openjdk.java.net/browse/JDK-8077229 
<https://bugs.openjdk.java.net/browse/JDK-8077229>

> On Nov 17, 2015, at 11:04 AM, Remi Forax <fo...@univ-mlv.fr> wrote:
> 
> Hi Konstantin,
> Technically, getInvokedynamicRefInfoAt should be 
> getNameAndTypeOfInvokedynamicRefInfoAt because it only extract the 
> nameAndType value of the InvokeDynamicRef.
> 
> In term of API, I think it's better to decompose the API, i.e. to have a 
> method
>  int getInvokedynamicRefNameAndTypeIndex(int index)
> that returns the nameAndType index and to reuse 
> getNameAndTypeRefInfoAt(index) to get the corresponding array of Strings. 
> 
> cheers,
> Rémi
> 
> ----- Mail original -----
>> De: "Christian Thalinger" <christian.thalin...@oracle.com>
>> À: "Konstantin Shefov" <konstantin.she...@oracle.com>
>> Cc: "hotspot-dev developers" <hotspot-...@openjdk.java.net>, 
>> core-libs-dev@openjdk.java.net
>> Envoyé: Lundi 16 Novembre 2015 23:41:45
>> Objet: Re: RFR [9] 8141615: Add new public methods to        
>> sun.reflect.ConstantPool
>> 
>> [CC'ing core-libs-dev]
>> 
>>> On Nov 13, 2015, at 4:55 AM, Konstantin Shefov
>>> <konstantin.she...@oracle.com> wrote:
>>> 
>>> Hello
>>> 
>>> Please review an enhancement to add three new methods to
>>> sun.reflect.ConstantPool class.
>>> The following methods are suggested:
>>> 
>>> public String[] getNameAndTypeRefInfoAt(int index) - returns string
>>> representation of name and type from a NameAndType constant pool entry
>>> with the specified index
>>> 
>>> public String[] getInvokedynamicRefInfoAt(int index) - returns string
>>> representation of name and type from an InvokeDynamic constant pool entry
>>> with the specified index
>>> 
>>> public Tag getTagAt(int index) - returns a Tag enum instance of a constant
>>> pool entry with the specified index
>>> 
>>> These three methods could be used for testing API working with constant
>>> pool, e.g. JVMCI.
>>> 
>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8141615
>>> Webrev hotspot:
>>> http://cr.openjdk.java.net/~kshefov/8141615/hotspot/webrev.00
>>> Webrev jdk: http://cr.openjdk.java.net/~kshefov/8141615/jdk/webrev.00
>>> 
>>> Thanks
>>> -Konstantin
>> 
>> 

Reply via email to