RFR: 8315066: Add unsigned bounds and known bits to TypeInt/Long [v7]

Emanuel Peter epeter at openjdk.org
Wed Sep 4 08:30:22 UTC 2024


On Tue, 3 Sep 2024 22:46:07 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> So `~` is a strictly decreasing function in the unsigned integer domain, so we just do a bitwise negation, compute the adjustment there and switch back.
>
> This deserves comment. When next person need to touch this code it will be "magic" and confusing.

I agree with @vnkozlov .

> So ~ is a strictly decreasing function in the unsigned integer domain, so we just do a bitwise negation, compute the adjustment there and switch back.

And this explanation does not help me, probably I'm just missing some definitions and how they relate to each other... comments in the code are crucial.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17508#discussion_r1743292167


More information about the hotspot-compiler-dev mailing list