RFR: 8358772: Template-Framework Library: Primitive Types [v3]

Emanuel Peter epeter at openjdk.org
Thu Jun 12 11:33:31 UTC 2025


On Thu, 12 Jun 2025 10:44:32 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review suggestions applied
>
> test/hotspot/jtreg/compiler/lib/template_framework/library/PrimitiveType.java line 71:
> 
>> 69:     @Override
>> 70:     public boolean isSubtypeOf(DataName.Type other) {
>> 71:         return (other instanceof PrimitiveType pt) && pt.kind == kind;
> 
> Perhaps it would be useful to implement the primitive type subtyping rules from [JLS §4.10.1](https://docs.oracle.com/javase/specs/jls/se24/html/jls-4.html#jls-4.10.1). I can imagine that it might help generating more diverse programs with random variables of random primitive types. That might help with fuzzing IGVN optimizations on ranges?

Very nice idea :)
I'll file a separate RFE for this. It is not a prime feature I need now, but it would be a good extension.
The user can still get exact behavior with `exactOf`, but also subtype behavior with `subtypeOf`. Nice!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25672#discussion_r2142433861


More information about the hotspot-compiler-dev mailing list