RFR: 8324433: Introduce a way to determine if an expression is evaluated as a constant by the Jit compiler [v5]

Aleksey Shipilev shade at openjdk.org
Wed Jan 24 09:06:29 UTC 2024


On Tue, 23 Jan 2024 22:49:49 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/misc/JitCompiler.java line 32:
>> 
>>> 30:  * Just-in-time-compiler-related queries
>>> 31:  */
>>> 32: public class JitCompiler {
>> 
>> An alternative name and location is `jdk.internal.vm.ConstantSupport` with initial class doc:
>> 
>> Defines methods to test if a value has been evaluated to a compile-time constant value by the HotSpot VM.
>
> That sounds like a better name for the class, although I think `jdk.internal.misc` is more suitable than `jdk.internal.vm`. Do you have any preference? Thanks.

+1 to `ConstantSupport`. I think `jdk.internal.vm` is a proper place for it. There is adjacent `jdk.internal.vm.vector.VectorSupport`, and whole `jdk.internal.vm.annotations` package is there too.

`jdk.internal.misc` sounds like a place for utility classes. `Unsafe` is a historical exception, I think.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17527#discussion_r1464551793


More information about the hotspot-compiler-dev mailing list