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

Emanuel Peter epeter at openjdk.org
Mon May 5 07:14:07 UTC 2025


On Fri, 2 May 2025 00:55:07 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Hmm ok. I think someone with a deeper knowledge of the type system has to check this. To me this does not make sense, but you clearly have much more knowledge here.
>
> I hope it is clearer now. This function always calculates the union of 2 `Type` instances. It is just that the `TypeInt`s have their subset relationship reversed if `_is_dual` is `true`, which makes it look like we are calculating the `join` but only when both arguments are `TypeInt`s. This comes from the fact that the `meet` of 2 `Type`s is the dual of the join of the 2 duals of the incoming `Type`s. Of course this duality dance is pretty convoluted and I am thinking about getting rid of it and calculating the join like a normal person.

Yeah, it sounds like a little bit of technical debt here, that keeps confusing most of us 😅 

Thanks for the explanations!

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

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


More information about the hotspot-compiler-dev mailing list