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

Emanuel Peter epeter at openjdk.org
Thu Jun 12 11:42:34 UTC 2025


On Thu, 12 Jun 2025 11:26:31 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> 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!

Filed: [JDK-8359335](https://bugs.openjdk.org/browse/JDK-8359335)

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

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


More information about the hotspot-compiler-dev mailing list