RFR: 8371178: Preserve fast version of getfield and putfield in AOTCache
Ashutosh Mehra
asmehra at openjdk.org
Tue Nov 4 17:04:42 UTC 2025
On Tue, 4 Nov 2025 16:32:54 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> Why is this switch block necessary? Is it possible for new_code to be different than *bcs.bcp()?
During preimage dumping all the fast bytecodes will be converted to nofast version because the CP entries are not resolved. So in the assembly phase `*bcs.bcp()` would be nofast version. If the CP entry is resolved, we can convert it to fast version. And we determine the type of the fast version using `tos_state` of the resolved field entry. So the `new_code` will be different than the `*bcs.bcp()` in the assembly phase.
They may be same when dumping dynamic archives, but not when dumping static archive or the final AOTCache.
Does that help?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28121#discussion_r2491336315
More information about the hotspot-runtime-dev
mailing list