mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8284579: Improve VarHandle checks for interpreter
Reviewed-by: mcimadamore, mchung
This commit is contained in:
parent
c35590282d
commit
280aa42880
4 changed files with 216 additions and 218 deletions
|
@ -695,8 +695,8 @@ final class VarHandles {
|
|||
// @LambdaForm.Compiled
|
||||
// @Hidden
|
||||
// static final <METHOD> throws Throwable {
|
||||
// handle.checkExactAccessMode(ad);
|
||||
// if (handle.isDirect() && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) {
|
||||
// boolean direct = handle.checkAccessModeThenIsDirect(ad);
|
||||
// if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) {
|
||||
// <RESULT_ERASED>MethodHandle.linkToStatic(<LINK_TO_STATIC_ARGS>);<RETURN_ERASED>
|
||||
// } else {
|
||||
// MethodHandle mh = handle.getMethodHandle(ad.mode);
|
||||
|
@ -710,10 +710,10 @@ final class VarHandles {
|
|||
// @LambdaForm.Compiled
|
||||
// @Hidden
|
||||
// static final <METHOD> throws Throwable {
|
||||
// handle.checkExactAccessMode(ad);
|
||||
// if (handle.isDirect() && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) {
|
||||
// boolean direct = handle.checkAccessModeThenIsDirect(ad);
|
||||
// if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) {
|
||||
// MethodHandle.linkToStatic(<LINK_TO_STATIC_ARGS>);
|
||||
// } else if (handle.isDirect() && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) {
|
||||
// } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) {
|
||||
// MethodHandle.linkToStatic(<LINK_TO_STATIC_ARGS>);
|
||||
// } else {
|
||||
// MethodHandle mh = handle.getMethodHandle(ad.mode);
|
||||
|
@ -859,9 +859,6 @@ final class VarHandles {
|
|||
// List<String> LINK_TO_STATIC_ARGS = params.keySet().stream().
|
||||
// collect(toList());
|
||||
// LINK_TO_STATIC_ARGS.add("handle.vform.getMemberName(ad.mode)");
|
||||
// List<String> LINK_TO_STATIC_ARGS_V = params.keySet().stream().
|
||||
// collect(toList());
|
||||
// LINK_TO_STATIC_ARGS_V.add("handle.vform.getMemberName_V(ad.mode)");
|
||||
//
|
||||
// List<String> LINK_TO_INVOKER_ARGS = params.keySet().stream().
|
||||
// collect(toList());
|
||||
|
@ -894,8 +891,6 @@ final class VarHandles {
|
|||
// replace("<RETURN_ERASED>", RETURN_ERASED).
|
||||
// replaceAll("<LINK_TO_STATIC_ARGS>", LINK_TO_STATIC_ARGS.stream().
|
||||
// collect(joining(", "))).
|
||||
// replaceAll("<LINK_TO_STATIC_ARGS_V>", LINK_TO_STATIC_ARGS_V.stream().
|
||||
// collect(joining(", "))).
|
||||
// replace("<LINK_TO_INVOKER_ARGS>", LINK_TO_INVOKER_ARGS.stream().
|
||||
// collect(joining(", ")))
|
||||
// .indent(4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue