[jdk11u-dev] RFR: 8263776: [JVMCI] add helper to perform Java upcalls [v2]

Severin Gehwolf sgehwolf at openjdk.java.net
Tue Aug 24 12:00:26 UTC 2021


On Tue, 24 Aug 2021 10:28:08 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> The original change handles `T_INT` and `T_FLOAT` (same bit width) with a single case statement. Same for `T_DOUBLE` and `T_LONG`. Therefore returning the more generic union types `value->i` and `value->j` respectively. I'm not sure this actually makes any difference. This seems the cleaner way to handle it.
>
> Yeah, I don't see the difference, but I think this is how we do conversions: put the `jdouble` to `value->d`, read `jlong` from `value->j`. Since this method returns `jlong`, I would expect `value->j` here. See e.g. `next_double()` in this patch.
> 
> Note that if we do `->f`, `->d` for `T_FLOAT` and `T_DOUBLE`, then it is reasonable to expect `T_BOOLEAN` and friends also replaced by their own type-specific union fields.
> 
> I would personally like to match mainline here, and then maybe clean up mainline, then backport the cleanup as the follow-up.

Sure. I've also noticed that there are minor differences to the JDK 17 version (local `return_type` variable over `jap.get_ret_type()`). Will fix. Thanks!

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

PR: https://git.openjdk.java.net/jdk11u-dev/pull/279


More information about the jdk-updates-dev mailing list