Static fields in specialized classes

Vitaly Davidovich vitalyd at gmail.com
Tue Oct 14 18:33:17 UTC 2014


Runtime bytecode enhancement/weaving? Non javac bytecode generators? Did
you see David Holmes' reply (JVMTI)?

Sent from my phone
On Oct 14, 2014 2:14 PM, "Brian Goetz" <brian.goetz at oracle.com> wrote:

> OK, now that this is settled...  can I get some input on the original
> question?  Can anyone else thing of code that will need to be adjusted to
> support this view of the world?
>
> On 10/14/2014 10:46 AM, Stephen Colebourne wrote:
>
>> On 13 October 2014 19:19, Brian Goetz <brian.goetz at oracle.com> wrote:
>>
>>> Consider:
>>>
>>> class Foo<any T> {
>>>      public final static int x = System.currentTimeMillis();
>>> }
>>>
>>> Regardless of whether our implementation is by specialization or erasure
>>> (or
>>> both), logically there is just *one* field 'x' for any instantiation
>>> Foo<T>.
>>>
>>
>> Just to note that I support this view of the world. I think the
>> alternatives would be surprising.
>>
>


More information about the valhalla-dev mailing list