On Tue, 9 May 2023 07:58:36 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Rename and comment put_when_absent. > > src/hotspot/share/prims/jvmtiTagMapTable.cpp line 50: > >> 48: _wh = src._wh; >> 49: _obj = nullptr; >> 50: } > > There can be just one line at 51 instead of two lines at 45 and 49 > where `_obj` field is initialized with the `nullptr`. > Is it intentional that the `_obj` field always gets `nullptr` value in this > constructor? Yes, _obj should always be null after copying either because we've transferred the oop over to the WeakHandle or that it's a copy from a node in the table so already a WeakHandle. I admit that having _obj assigned to null in both places looks odd, but it was for two different reasons. I added a comment too. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13818#discussion_r1188641401