collection of small fixes from running runtime tests with -Xcomp

Roland Westrelin rwestrel at redhat.com
Tue Mar 14 16:16:34 UTC 2017


http://cr.openjdk.java.net/~roland/valhalla/xcompfixes/webrev.00/

Because of method handles, in SharedRuntime::allocate_value_types()
using the static target is not good enough because its signature of the
static target might differ from the signature of the actual callee. So
instead, the runtime call is now passed the actual target which is good
because we also probably need to do something to keep it alive.

The bcEscapeAnalyzer.cpp fix is obvious.

We can't use the value factory parameter mapping until the value class
is initialized: added an assert and an uncommon trap so the assert
doesn't fire.

Sometimes a lambda form compiled as the root of a compilation has a
signature with object parameters but is passed a value type: so it's
passed fields but has no way to know. This could be fixed by always
passing value types as references when the target is a lambda form. But
then, method handles intrinsics could get reference inputs and call a
method that expects value types to be passed as fields. So the code in
MethodHandles::generate_method_handle_dispatch() would need to be
adjusted to shuffle arguments. That all sounds too complicated so
instead I disallowed lambda form as root of compilations.

Roland.


More information about the valhalla-dev mailing list