RFR: 8160404: RelocationHolder constructors have bugs [v3]

Kim Barrett kbarrett at openjdk.org
Fri Dec 16 04:48:46 UTC 2022


On Fri, 16 Dec 2022 02:16:51 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Kim Barrett has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - use alignas
>>  - simplify per jvernee
>
> src/hotspot/share/code/relocInfo.hpp line 992:
> 
>> 990:     assert(relocInfo::mustIterateImmediateOopsInCode(),
>> 991:            "Must return true so we will search for oops as roots etc. in the code.");
>> 992:     return RelocationHolder::construct<oop_Relocation>(0, 0);
> 
> I prefer how it was before, where the arguments have names and comments.

Done.

> src/hotspot/share/code/relocInfo.hpp line 1041:
> 
>> 1039:   // an metadata in the instruction stream
>> 1040:   static RelocationHolder spec_for_immediate() {
>> 1041:     return RelocationHolder::construct<metadata_Relocation>(0, 0);
> 
> I'd rather see (metadata_index, offset) than (0, 0), but I guess the meaning of the argument can be found in spec() above.

Done.

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

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


More information about the hotspot-compiler-dev mailing list