RFR[XS] 8249809 avoid calling DirectiveSet::clone(this) in compilecommand_compatibility_init
Tobias Hartmann
tobias.hartmann at oracle.com
Fri Jul 31 07:10:01 UTC 2020
On 29.07.20 16:34, Volker Simonis wrote:
> Because there's also a "read-only" access of the DirectiveSetPtr
> which doesn't mutate its content and therefore should clone the
> underlying DirectiveSet. See my first mail where I proposed to add a
> second, `const`-version of "operator->". But that still required const
> casts in the places where we didn't want to clone. I've therefore
> voted for the new "cloned()" method which makes cloning and mutating
> explicit and which is much easier to understand from my point of view
> (compared to two overloaded operators).
Right, I've missed the "set->LogOption" usage.
Best regards,
Tobias
More information about the hotspot-compiler-dev
mailing list