RFR: 8315066: Add unsigned bounds and known bits to TypeInt/Long [v54]
Quan Anh Mai
qamai at openjdk.org
Fri May 2 00:58:10 UTC 2025
On Thu, 1 May 2025 15:43:23 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> I have also added an explanation for this function.
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17508#discussion_r2070971781
More information about the hotspot-compiler-dev
mailing list