RFR(S) : 8011971 : WB API doesn't accept j.l.reflect.Constructor
Vladimir Kozlov
vladimir.kozlov at oracle.com
Fri Apr 12 13:59:40 PDT 2013
On 4/12/13 1:14 PM, Igor Ignatyev wrote:
> > Could you explain why you need j.l.reflect.Constructor in WB compiler
> > tests? As java coding exercise it may be good (I am lost in it). But how
> > it helps to JIT compiler testing?
Here is a good comment ;) :
> we have plan to create replacement of current CTW. main goal is to make
> available using CTW in product build. but it must be equals to current
> implementation in terms of functionality. since CTW compile constructor,
> we also must to compile constructor. so we need api for that.
>
> > Do you know about 'comments' in a code? :)
> yes. i know, but i think that all is clear and self-documented :)
> but if you insist, i can add javadoc to all public and protected
> methods/fields.
Please, do. Especially for methods and tests classes.
>
> > Why do you need to set dontinline in costructor?
> > Would be better explicitly call new method from CompilerWhiteBoxTest
> > class when needed:
> >
> > setDontInlineMethod() {
> > WHITE_BOX.testSetDontInlineMethod(method, true);
> > }
> i need to set dontinline in constructor to prevent inlining of 'method'
> into others methods (fix for 8008211).
I meant, why you need to do it in 'super' constructor?
You can call setDontInlineMethod() in local constructor. Test methods
will be executed only after constructor executed.
Thanks,
Vladimir
>
> Best regards,
> Igor Ignatyev
>
> On 04/12/2013 11:39 PM, Vladimir Kozlov wrote:
>> Igor,
>>
>> Could you explain why you need j.l.reflect.Constructor in WB compiler
>> tests? As java coding exercise it may be good (I am lost in it). But how
>> it helps to JIT compiler testing?
>>
>> Do you know about 'comments' in a code? :)
>>
>> Using argument 'true' say nothing what it does since the corresponding
>> code is in different class file:
>>
>> + super(testCase, true);
>>
>> Why do you need to set dontinline in costructor?
>> Would be better explicitly call new method from CompilerWhiteBoxTest
>> class when needed:
>>
>> setDontInlineMethod() {
>> WHITE_BOX.testSetDontInlineMethod(method, true);
>> }
>>
>> Regards,
>> Vladimir
>>
>> On 4/12/13 8:29 AM, Igor Ignatyev wrote:
>>> Hi all,
>>>
>>> Please review patch.
>>>
>>> 1. changed signature of all methods where j.l.reflect.Method is used
>>> 2. added tests which use j.l.reflect.Constructor
>>>
>>> webrev: http://cr.openjdk.java.net/~iignatyev/8011971/webrev.00/
>>> jbs: https://jbs.oracle.com/bugs/browse/JDK-8011971
More information about the hotspot-compiler-dev
mailing list