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

Severin Gehwolf sgehwolf at openjdk.java.net
Mon Aug 23 16:31:26 UTC 2021


On Mon, 23 Aug 2021 14:29:13 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Here is a backport for JDK-8263776. The patch doesn't apply cleanly since it uses features only introduced with JDK-8230199 (JDK 15+, not in OpenJDK 11u). This patch is the same labsopenjdk 11 uses. This patch is also needed for using graal js with plain OpenJDK.
>> 
>> Testing: test/hotspot/jtreg/compiler/jvmci and manual upstream Graal unit test.
>
> src/hotspot/share/jvmci/jvmciRuntime.cpp line 513:
> 
>> 511:         return value->f;
>> 512:       case T_DOUBLE:
>> 513:         return value->d;
> 
> The original commit uses `value->i` and `value->j` here. Of course, `value->f` and `value->d` look more correct, but do you understand why this difference?

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.

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

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


More information about the jdk-updates-dev mailing list