8075263: MHI::checkCustomized isn't eliminated for inlined MethodHandles

Reviewed-by: jrose, kvn
This commit is contained in:
Vladimir Ivanov 2015-03-20 11:42:31 -07:00
parent 1b547035a8
commit 71020f90ef
2 changed files with 8 additions and 0 deletions

View File

@ -394,6 +394,7 @@ class Invokers {
@ForceInline
void checkCustomized(Object o) {
MethodHandle mh = (MethodHandle)o;
if (MethodHandleImpl.isCompileConstant(mh)) return;
if (mh.form.customized == null) {
maybeCustomize(mh);
}

View File

@ -722,6 +722,13 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
return result;
}
// Intrinsified by C2. Returns true if obj is a compile-time constant.
@LambdaForm.Hidden
static
boolean isCompileConstant(Object obj) {
return false;
}
static
MethodHandle makeGuardWithTest(MethodHandle test,
MethodHandle target,