8166110: Inlining through MH invokers/linkers in unreachable code is unsafe

Reviewed-by: vlivanov
This commit is contained in:
Dmitry Chuyko 2017-02-09 19:00:48 +03:00 committed by Vladimir Ivanov
parent 4dd3138c5d
commit 1acb306859
5 changed files with 179 additions and 85 deletions

View file

@ -43,6 +43,21 @@ public class MethodHandleHelper {
mh.customize();
}
@ForceInline
public static Object internalMemberName(MethodHandle mh) throws Throwable {
return mh.internalMemberName();
}
@ForceInline
public static void linkToStatic(MethodHandle mh, float arg, Object name) throws Throwable {
MethodHandle.linkToStatic(mh, arg, name);
}
@ForceInline
public static void invokeBasicV(MethodHandle mh, float arg) throws Throwable {
mh.invokeBasic(arg);
}
@ForceInline
public static Object invokeBasicL(MethodHandle mh) throws Throwable {
return mh.invokeBasic();