RFR: 8215473: [lworld] Support for substitutability checks in C2

Roland Westrelin rwestrel at redhat.com
Fri Jan 25 10:06:46 UTC 2019


Hi Tobias,

Thanks for the review.

> Looking at the changes in sharedRuntime.cpp, wouldn't you also need those in
> SharedRuntime::resolve_opt_virtual_call_C()?

The call to ValueBootstrapMethods::isSubstitutable() needs to be
resolved and for that the code explicitly piggy backs on static call
resolution:

    CallStaticJavaNode *call = new CallStaticJavaNode(C, TypeFunc::make(subst_method), SharedRuntime::get_resolve_static_call_stub(), subst_method, bci());

So, no need to change anything for virtual calls.

> I would prefer moving this code into SharedRuntime::resolve_sub_helper() and guard it by the
> is_virtual/is_optimized arguments. There you already lookup caller_frame/caller_cb/...
>
> Otherwise it looks good to me. Some comments in Parse::do_acmp would be nice but we can refactor
> that later (this acmp stuff will probably evolve further anyway).

Here is a new webrev with the change you suggested in sharedRuntime.cpp
and some comments:

http://cr.openjdk.java.net/~roland/8215473/webrev.01/

Roland.


More information about the valhalla-dev mailing list