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

Vladimir Kozlov kvn at openjdk.java.net
Thu Mar 18 16:49:40 UTC 2021


On Thu, 18 Mar 2021 06:30:49 GMT, Tom Rodriguez <never at openjdk.org> wrote:

> 8263776: [JVMCI] add helper to perform Java upcalls

src/hotspot/share/jvmci/jvmciRuntime.cpp line 488:

> 486: 
> 487:  public:
> 488:   ArgumentPusher(Symbol* signature, JavaCallArguments*  jca, jlong argument, bool is_static) : SignatureIterator(signature) {

`is_static` is not used.

src/hotspot/share/jvmci/jvmciRuntime.cpp line 527:

> 525:   JavaCallArguments jca(mh->size_of_parameters());
> 526:   ArgumentPusher jap(signature, &jca, argument, mh->is_static());
> 527:   JavaValue result(jap.get_ret_type());

`jap.get_ret_type()` is used several times in this code. Why not cache it in local variable?

src/hotspot/share/jvmci/jvmciRuntime.cpp line 554:

> 552:         return value->j;
> 553:       default:
> 554:         ShouldNotReachHere();

I would prefer to see `fatal(msg)` which prints what is unexpected type.

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

PR: https://git.openjdk.java.net/jdk/pull/3067


More information about the hotspot-compiler-dev mailing list