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

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


On Fri, 2 May 2025 08:51:45 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> src/hotspot/share/opto/type.hpp line 293:
>> 
>>> 291: 
>>> 292:   template <typename TypeClass>
>>> 293:   const TypeClass* try_cast() const;
>> 
>> This is a way to get to the `isa_...` via templated types, right?
>> 
>> I wonder if it might be better to name it `isa_???`, or even just `isa`, so that it is clearer that it is about the `isa` query.
>> 
>> Currently, it is not very clear what it does, until you look at the implementation. That's a bit unfortunate.
>
> I like the naming `try_cast` better because it aligns with the semantics of `std::dynamic_cast`. `isa` is a bad name.

Ok, I don't care enough either way.

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

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


More information about the hotspot-compiler-dev mailing list