7057587: JSR 292 - crash with jruby in test/test_respond_to.rb

Don't skip receiver when GC'ing compiled invokedynamic callsites

Reviewed-by: twisti, kvn, jrose
This commit is contained in:
Tom Rodriguez 2011-06-22 14:45:37 -07:00
parent 7c1d16f7d3
commit 15161b8cd1
4 changed files with 41 additions and 34 deletions

View file

@ -1832,7 +1832,9 @@ void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map
if (!method()->is_native()) {
SimpleScopeDesc ssd(this, fr.pc());
Bytecode_invoke call(ssd.method(), ssd.bci());
bool has_receiver = call.has_receiver();
// compiled invokedynamic call sites have an implicit receiver at
// resolution time, so make sure it gets GC'ed.
bool has_receiver = !call.is_invokestatic();
Symbol* signature = call.signature();
fr.oops_compiled_arguments_do(signature, has_receiver, reg_map, f);
}