RFR: 8371178: Preserve fast version of getfield and putfield in AOTCache [v2]

Ashutosh Mehra asmehra at openjdk.org
Wed Nov 5 01:33:47 UTC 2025


On Tue, 4 Nov 2025 17:28:09 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?
>
> I see. Could you add a comment? Maybe the code should be reformatted like this to make it easier to navigate?
> 
> 
>         case ftos:  new_code = Bytecodes::_fast_fgetfield;  break;
>         case dtos: new_code = Bytecodes::_fast_dgetfield; break;
>         default:  ShouldNotReachHere();

Done

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28121#discussion_r2492505638


More information about the hotspot-runtime-dev mailing list