On Wed, 6 May 2026 11:11:56 GMT, Paul Hübner <[email protected]> wrote:
>> Tobias Hartmann has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Update src/hotspot/share/opto/type.cpp
>
> src/hotspot/share/runtime/deoptimization.cpp line 1257:
>
>> 1255: BooleanBoxCache* BooleanBoxCache::_singleton = nullptr;
>> 1256:
>> 1257: oop Deoptimization::get_cached_box(AutoBoxObjectValue* bv, frame* fr,
>> RegisterMap* reg_map, bool& cache_init_error, TRAPS) {
>
> None of our box caches should be flat arrays. This should also apply to
> `BooleanBoxCache`, whose fields `TRUE` and `FALSE` should not be flattened.
> This is currently the case because we don't flatten `static` fields, but I
> think it'd be good to explicitly express these invariants as assertions
> somewhere (does not have to be here). Or even a comment saying to look at the
> JDKland code, so HotSpot readers see the absence of flattening.
I added assertions that box caches are reference arrays and Boolean cache
fields are initialized.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2390#discussion_r3233507758