7199175: JSR 292: C1 needs patching when invokedynamic/invokehandle call site is not linked

Do patching rather bailing out for unlinked call with appendix

Reviewed-by: twisti, kvn
This commit is contained in:
Roland Westrelin 2013-08-21 13:34:45 +02:00
parent dac98bcc0d
commit f188c2bf70
23 changed files with 184 additions and 63 deletions

View file

@ -93,12 +93,23 @@ void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_cod
default:
ShouldNotReachHere();
}
} else if (patch->id() == PatchingStub::load_appendix_id) {
Bytecodes::Code bc_raw = info->scope()->method()->raw_code_at_bci(info->stack()->bci());
assert(Bytecodes::has_optional_appendix(bc_raw), "unexpected appendix resolution");
} else {
ShouldNotReachHere();
}
#endif
}
PatchingStub::PatchID LIR_Assembler::patching_id(CodeEmitInfo* info) {
IRScope* scope = info->scope();
Bytecodes::Code bc_raw = scope->method()->raw_code_at_bci(info->stack()->bci());
if (Bytecodes::has_optional_appendix(bc_raw)) {
return PatchingStub::load_appendix_id;
}
return PatchingStub::load_mirror_id;
}
//---------------------------------------------------------------