RFR: 8299274: Add elements to resolved_references consistently

Robbin Ehn rehn at openjdk.org
Wed Jan 4 14:52:54 UTC 2023


On Wed, 4 Jan 2023 14:44:07 GMT, Frederic Parain <fparain at openjdk.org> wrote:

>> The reason I made it resolved_references plural is so you can grep on resolved_references and see all operations on this array.
>> 
>> We do not overwrite anything.  We may have multiple threads writing the same string to it.  There's an assert in string_at_put:
>>   assert(result == nullptr || result == str, "Only set once or to the same string.");
>> 
>> I need it to return the existing value for the code in resolve_constant_at_impl().
>
> Shouldn't this method check the validity of the index argument?

> I need it to return the existing value for the code in resolve_constant_at_impl().

So it's a getter/setter, but if the argument must be nullptr, I think we should skip it.

-------------

PR: https://git.openjdk.org/jdk/pull/11834


More information about the hotspot-dev mailing list