RFR(T): 8219554: Redundant lookup_common in SymbolTable::add

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Fri Feb 22 15:19:01 UTC 2019


This change looks great!  I had a version of this once in my private 
repo (with the redundant lookup), so that's a nice improvement.

Thank you!
Coleen

On 2/22/19 6:59 AM, Claes Redestad wrote:
>
>
> On 2019-02-22 01:55, Ioi Lam wrote:
>> Hi Claes,
>>
>> Before your change, there's no API requirement that you must have 
>> called SymbolTable::lookup_common before calling SymbolTable::add, 
>> even though that is the behavior of the classFileParser.
>>
>> So, in order to codify this new requirement, I think you should you 
>> should add an assert:
>>
>>
>> +   assert(lookup_shared(name, len, hash) == NULL, "must have checked 
>> already");
>>      Symbol* sym = SymbolTable::the_table()->do_add_if_needed(name, 
>> len, hash, c_heap, CHECK);
>
> Agreed, also folded add into new_symbols, which makes more sense in this
> context anyhow:
>
> http://cr.openjdk.java.net/~redestad/8219554/open.00/
>
> Thanks!
>
> /Claes



More information about the hotspot-runtime-dev mailing list