Review request: update javac to properly output mandated parameters in MethodParameters attributes
Eric McCorkle
eric.mccorkle at oracle.com
Tue Feb 12 06:53:32 PST 2013
On 02/12/13 07:03, Maurizio Cimadamore wrote:
> Looks almost good to go - few comments:
>
> *) I think you forgot to remove the old outerThisDef on Lower (i.e.
> there are two of them, slightly different - the logic should somehow be
> merged)
No, actually, that variant has to be there in order to add the outer
this field in a ClassSymbol.
>
> *) I would initialize the extraParams field in Symbol itself to
> List.nil() - note that List.nil points to a shared instance so you will
> not end up creating unnecessary instances. And you would automatically
> guarantee that the list is always set to something.
>
Done.
> *) Tests?
There is an extensive test suite being developed by Peter Jensen, but I
imagine he'll want to push it himself.
>
> Maurizio
>
> On 11/02/13 23:15, Eric McCorkle wrote:
>> I have revised the approach as I describe below, to make the extra
>> parameters visible from MethodSymbols, and to make sure the proper flags
>> are set at creation time. Please look at the latest webrev and review.
>>
>> Thanks to everyone who helped!
>>
>> On 02/11/13 12:30, Eric McCorkle wrote:
>>> The problem with this patch as it stands is that it decides what flags
>>> to set in the generated parameters in output, which isn't the right way
>>> to do it.
>>>
>>> However, since there are no VarSymbols stored for the extra parameters,
>>> at present there's no choice but to do it that way.
>>>
>>> An alternative would be to add a List for the extra parameters, then we
>>> could set the flags properly when the parameters are created.
>>>
>>> If I can get some pointers from more experienced javac developers about
>>> where the parameter lists are created and initialized, I might be able
>>> to get this done by Wednesday.
>>>
>>> On 02/08/13 16:20, Eric McCorkle wrote:
>>>> I've updated the webrev.
>>>>
>>>> The extra parameters are now generated with SYNTHETIC flags set by
>>>> default, except when they match the three cases in the spec ("name"
>>>> parameter of an Enum's valueOf, the first parameter of an anonymous
>>>> constructor, or the first parameter of a non-private inner member
>>>> class).
>>>>
>>>> I've tested these using the examples from Peter Jensen's test suite.
>>>>
>>>> Please look over the new webrev and comment.
>>>>
>>>> Thanks,
>>>> Eric
>>>>
>>>> On 02/06/13 12:23, Eric McCorkle wrote:
>>>>> Hello,
>>>>>
>>>>> Please review the following patch, which updates javac to output
>>>>> mandated parameters in MethodParameters attributes. It also updates
>>>>> javac to reflect spec changes, namely the definition of the
>>>>> ACC_MANDATED
>>>>> flag.
>>>>>
>>>>> The webrev is here:
>>>>> http://cr.openjdk.java.net/~emc/8006345/
>>>>>
>>>>> This patch addresses the following issues:
>>>>> http://bugs.sun.com/view_bug.do?bug_id=8006345
>>>>> http://bugs.sun.com/view_bug.do?bug_id=8006896
>>>>> http://bugs.sun.com/view_bug.do?bug_id=8006345
>>>>>
>>>>> The latest version of the spec for parameter reflection can be
>>>>> found here:
>>>>>
>>>>> http://cr.openjdk.java.net/~abuckley/8misc.pdf
>>>>>
>>>>> Thanks,
>>>>> Eric
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eric_mccorkle.vcf
Type: text/x-vcard
Size: 314 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20130212/86b54f72/eric_mccorkle.vcf
More information about the compiler-dev
mailing list