Mercurial > hg > graal-compiler
diff src/share/vm/c1/c1_LIRAssembler.cpp @ 12160:f98f5d48f511
7199175: JSR 292: C1 needs patching when invokedynamic/invokehandle call site is not linked
Summary: Do patching rather bailing out for unlinked call with appendix
Reviewed-by: twisti, kvn
author | roland |
---|---|
date | Wed, 21 Aug 2013 13:34:45 +0200 |
parents | 7eca5de9e0b6 |
children | cefad50507d8 de6a9e811145 |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_LIRAssembler.cpp Fri Aug 23 18:04:35 2013 -0700 +++ b/src/share/vm/c1/c1_LIRAssembler.cpp Wed Aug 21 13:34:45 2013 +0200 @@ -93,12 +93,23 @@ 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; +} //---------------------------------------------------------------