Equivalent .class fields should share the same symbol
Jan Lahoda
jan.lahoda at oracle.com
Mon Apr 16 17:40:55 UTC 2018
On 16.4.2018 19:31, B. Blaser wrote:
> Hi Jan,
>
> On 16 April 2018 at 17:02, Jan Lahoda <jan.lahoda at oracle.com> wrote:
>> Hi Bernard,
>>
>> There are two things I wonder about:
>> -can the key to the map be TypeSymbol? Basically "site.tsym" instead of "new
>> Types.UniqueType(site...)". To me that would feel simpler.
>
> I had the feeling that using 'site.tsym' might fail with arrays, but
> I'll check this.
You are probably right this won't work. Sorry, I didn't figure that out
- I was checking primitives, and those seemed that could work.
>
>> -should there be a method in Symtab managing the map? Something like:
>> Symtab.getClassField(TypeSymbol tsym) {/*create the VarSymbol is needed*/}
>
> I'll take a look if you think it's worth adding a method for this.
I think it would be nicer than maintaining the map from another class,
if possible/doable.
Thanks,
Jan
>
>> Thanks,
>> Jan
>
> Thanks,
> Bernard
>
More information about the compiler-dev
mailing list