On Fri, 13 Mar 2026 12:01:12 GMT, Stefan Karlsson <[email protected]> wrote:

> This will help reducing the number of casts.
> 
> `Runtime1::store_flat_array` had an incorrect type and had to be fixed.

Looks good, did not check if this is complete.

I wonder if adding something like would be alright to disallow doing 
unnecessary casts. Might be annoying for templated code.
```c++
  // class FlatArrayKlass ...
  static FlatArrayKlass* cast(FlatArrayKlass* k) = delete;
  static const FlatArrayKlass* cast(const FlatArrayKlass* k) = delete;

  // class RefArrayKlass ...
  static RefArrayKlass* cast(RefArrayKlass* k) = delete;
  static const RefArrayKlass* cast(const RefArrayKlass* k) = delete;

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

Marked as reviewed by aboldtch (Committer).

PR Review: 
https://git.openjdk.org/valhalla/pull/2224#pullrequestreview-3943606033

Reply via email to