RFR: 8310494: Do not include constantPool.hpp from instanceKlass.hpp [v2]
Ioi Lam
iklam at openjdk.org
Thu Jun 22 03:16:20 UTC 2023
On Wed, 21 Jun 2023 16:14:24 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> I do wonder if the code wouldn't be nicer if we simply removed these delegating functions in InstanceKlass and let the callers operate on the ConstantPool directly instead?
The version and signature logically belong to the class, so I think the functions should be part of InstanceKlass. The fact that they are stored inside the ConstantPool is just an implementation detail that can change. IIRC it was done this way because the ConstantPool can be stored in the read-only section of the CDS archive.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14597#issuecomment-1601955791
More information about the hotspot-dev
mailing list