On Tue, 16 Apr 2024 19:03:01 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> Thank you, @coleenp, foe looking on these changes. >> >> Which fields are initialized twice? Only `_oop_maps` is set to `nullptr` >> before we proper build oop maps in first constructor. >> >> The only saving could be lines of code but then I would have to check that >> `cb != nullptr` and do other additional checks which I don't think will save >> much lines. >> >> Separation of `nmethod` constructor for native wrappers is helping clear see >> the difference and I would like to keep them separate. We have >> `init_defaults()` method for similar code and I can move more code into it >> from both constructors. > > Delegating constructors are the answer to having some common 'init' > functions. It would simply save lines of code that look the same in both > constructor initializer lists. But it's a drive-by comment. Okay. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18768#discussion_r1567841490