2330 // Method that knows how to preserve outgoing arguments at call. This method must be |
2330 // Method that knows how to preserve outgoing arguments at call. This method must be |
2331 // called with a frame corresponding to a Java invoke |
2331 // called with a frame corresponding to a Java invoke |
2332 void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { |
2332 void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { |
2333 #ifndef SHARK |
2333 #ifndef SHARK |
2334 if (method() != NULL && !method()->is_native()) { |
2334 if (method() != NULL && !method()->is_native()) { |
2335 SimpleScopeDesc ssd(this, fr.pc()); |
2335 address pc = fr.pc(); |
|
2336 SimpleScopeDesc ssd(this, pc); |
2336 Bytecode_invoke call(ssd.method(), ssd.bci()); |
2337 Bytecode_invoke call(ssd.method(), ssd.bci()); |
2337 bool has_receiver = call.has_receiver(); |
2338 bool has_receiver = call.has_receiver(); |
2338 bool has_appendix = call.has_appendix(); |
2339 bool has_appendix = call.has_appendix(); |
2339 Symbol* signature = call.signature(); |
2340 Symbol* signature = call.signature(); |
|
2341 |
|
2342 // The method attached by JIT-compilers should be used, if present. |
|
2343 // Bytecode can be inaccurate in such case. |
|
2344 Method* callee = attached_method_before_pc(pc); |
|
2345 if (callee != NULL) { |
|
2346 has_receiver = !(callee->access_flags().is_static()); |
|
2347 has_appendix = false; |
|
2348 signature = callee->signature(); |
|
2349 } |
|
2350 |
2340 fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f); |
2351 fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f); |
2341 } |
2352 } |
2342 #endif // !SHARK |
2353 #endif // !SHARK |
2343 } |
2354 } |
2344 |
2355 |