RFR: 8341199: Use ClassFile's new API loadConstant(int)
Chen Liang
liach at openjdk.org
Mon Sep 30 13:23:36 UTC 2024
On Mon, 30 Sep 2024 10:03:57 GMT, Shaojin Wen <swen at openjdk.org> wrote:
> The new API loadConstant(int) can shorten the calling path and can replace ldc when the parameter is of int/Integer type.
I think to address these, we will leave the specification of `loadConstant` open so we can always flexibly adjust if we need. Currently javac compiles `-1L` to a `ldc2_w` which is more similar to existing ClassFile API behavior.
For `ldc`, we can remove the `ConstantDesc` version and keep the `LoadableConstantEntry` version.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21259#issuecomment-2383179397
More information about the hotspot-jfr-dev
mailing list