Integrated: 8377172: Change datatype of CodeEntryAlignment to uint

Leo Korinth lkorinth at openjdk.org
Wed Feb 11 09:45:55 UTC 2026


On Mon, 9 Feb 2026 14:15:50 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:

> The main idea of this change is to remove an implicitly narrowing conversion to int from intx (`int code_alignment()`).
> 
> CodeEntryAlignment is constrained to not be bigger than CodeCacheSegmentSize that is itself constrained to be in the range(1, 1024). The data type should really be a uint16_t as its allowed range is [16-1024], but we have no such support for VM flags. uint will do, and will simplify the code greatly (five less casts, six if we count the implicit narrowing cast).
> 
> This change is inspired by my change 8376892: Allow conversion warnings in subsets of the code base.
> 
> Completed test tier 1-3.

This pull request has now been integrated.

Changeset: 57931dc6
Author:    Leo Korinth <lkorinth at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/57931dc6b24af2c02206b01bcc417e5607d39371
Stats:     47 lines in 16 files changed: 2 ins; 2 del; 43 mod

8377172: Change datatype of CodeEntryAlignment to uint

Reviewed-by: ayang, mhaessig

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

PR: https://git.openjdk.org/jdk/pull/29637


More information about the hotspot-dev mailing list