Review request for JDK-8004727

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Tue Dec 18 03:11:17 PST 2012


Looks good; minor nit: order of imports in the test.

Maurizio

On 18/12/12 01:56, Eric McCorkle wrote:
> Thanks, Jon.  I've applied the changes you suggested, and I'm putting in
> a CCC to add the parameter flag.
>
> On 12/17/12 15:19, Jonathan Gibbons wrote:
>> jvm/ClassReader:122
>> sawMethodParameters is not a switch, which is a configuration parameter,
>> and should not be grouped with them.  It is just boolean state that is
>> set while reading the classfile.
>>
>> jvm/ClassWriter:724
>> The method only writes at most one attribute, so the method name should
>> not be plural.  On the other hand, it could write more than one
>> parameter name, so how about writeParameterNamesAttr, or better,
>> writeMethodParametersAttr
>>
>> Option
>> You need to file a CCC and make this option public; this should not be a
>> hidden option
>>
>> -- Jon
>>
>> On 12/17/2012 11:20 AM, Eric McCorkle wrote:
>>> Hello,
>>>
>>> Please review the implementation of the javac side of method parameter
>>> reflection.  The feature request can be found here:
>>>
>>> http://bugs.sun.com/view_bug.do?bug_id=8004727
>>>
>>> Summary:
>>>
>>> The names, as well as other information about method parameters can now
>>> optionally be stored in Java class files.  There are updates to javac to
>>> create the parameter attributes when a -parameters flag is given.  There
>>> are also updates to the com.sun.tools.classfile API to correctly parse
>>> method parameter attributes, and to javap to print them.
>>>
>>> This code includes new tests, and has been tested by running numerous
>>> regression test suites, including some with javac hardwired to generate
>>> class files with parameter annotations.
>>>
>>>
>>> The open webrev can be found here:
>>>
>>> http://cr.openjdk.java.net/~coleenp/JDK-8004727/
>>>
>>>
>>> The specification for Method Parameter reflection can be found here:
>>>
>>> http://cr.openjdk.java.net/~abuckley/8misc.pdf
>>>
>>> Thanks,
>>> Eric




More information about the compiler-dev mailing list