comparison src/share/vm/code/nmethod.cpp @ 3784:aabf25fa3f05

7057587: JSR 292 - crash with jruby in test/test_respond_to.rb Summary: don't skip receiver when GC'ing compiled invokedynamic callsites Reviewed-by: twisti, kvn, jrose
author never
date Wed, 22 Jun 2011 14:45:37 -0700
parents 2aa9ddbb9e60
children be4ca325525a fdb992d83a87
comparison
equal deleted inserted replaced
3783:de6a837d75cf 3784:aabf25fa3f05
1830 void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { 1830 void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
1831 #ifndef SHARK 1831 #ifndef SHARK
1832 if (!method()->is_native()) { 1832 if (!method()->is_native()) {
1833 SimpleScopeDesc ssd(this, fr.pc()); 1833 SimpleScopeDesc ssd(this, fr.pc());
1834 Bytecode_invoke call(ssd.method(), ssd.bci()); 1834 Bytecode_invoke call(ssd.method(), ssd.bci());
1835 bool has_receiver = call.has_receiver(); 1835 // compiled invokedynamic call sites have an implicit receiver at
1836 // resolution time, so make sure it gets GC'ed.
1837 bool has_receiver = !call.is_invokestatic();
1836 Symbol* signature = call.signature(); 1838 Symbol* signature = call.signature();
1837 fr.oops_compiled_arguments_do(signature, has_receiver, reg_map, f); 1839 fr.oops_compiled_arguments_do(signature, has_receiver, reg_map, f);
1838 } 1840 }
1839 #endif // !SHARK 1841 #endif // !SHARK
1840 } 1842 }