RFR(S): JDK-8189690 Static fields support for Value Types is broken

Frederic Parain frederic.parain at oracle.com
Mon Oct 23 13:31:17 UTC 2017


Thank you for the reviews.

Fred

On 10/23/2017 03:39 AM, David Simms wrote:
> 
> Nice, looks good...
> 
> 
> On 20/10/17 17:35, Frederic Parain wrote:
>> Mr Simms,
>>
>> Thank you for the review and the unit test.
>> In fact I had a test for this in a new set of tests I’m currently 
>> working on,
>> but it doesn’t hurt to have unit test with the changeset.
>>
>> I’ve integrated your test within ValueTypeCreation.java as you suggested.
>> I’ve also slightly changed code in classFileParser.cpp to reduce the 
>> number
>> of lookup into the SystemDictionary.
>>
>> New webrev:
>>
>> http://cr.openjdk.java.net/~fparain/8189690/webrev.01/index.html
>>
>> Regards,
>>
>> Fred
>>
>>> On Oct 20, 2017, at 04:14, David Simms <david.simms at oracle.com> wrote:
>>>
>>>
>>> The fix looks fine, could we maybe something like this to 
>>> "ValueTypeCreation.java" (inner class should be fine)...
>>>
>>> final __ByValue class StaticSelf {
>>>
>>>      static final StaticSelf DEFAULT = create(0,0);
>>>
>>>      final int f1;
>>>
>>>      private StaticSelf() { f1 = 0; }
>>>
>>>      public String toString() { return "StaticSelf f1=" + f1; }
>>>
>>>      __ValueFactory static StaticSelf create(int f1) {
>>>
>>>          StaticSelf s = __MakeDefault StaticSelf();
>>>
>>>          s.f1 = f1;
>>>
>>>          return s;
>>>
>>>      }
>>>
>>>      public static void test() { /*** run me ***/
>>>
>>>          String s = DEFAULT.toString();
>>>
>>>      }
>>>
>>> }
>>>
>>>
>>>
>>> Cheers
>>> /David Simms
>>>
>>>
>>> On 19/10/17 22:29, Frederic Parain wrote:
>>>> Please review this small fix on static fields handling:
>>>>
>>>> CR: https://bugs.openjdk.java.net/browse/JDK-8189690
>>>>
>>>> Webrev: 
>>>> http://cr.openjdk.java.net/~fparain/8189690/webrev.00/index.html
>>>>
>>>> Thank you,
>>>>
>>>> Fred
>>>>
> 



More information about the valhalla-dev mailing list