< prev index next >

src/hotspot/share/code/compiledMethod.cpp

Print this page


 341 }
 342 
 343 // Method that knows how to preserve outgoing arguments at call. This method must be
 344 // called with a frame corresponding to a Java invoke
 345 void CompiledMethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
 346   if (method() != NULL && !method()->is_native()) {
 347     address pc = fr.pc();
 348     // The method attached by JIT-compilers should be used, if present.
 349     // Bytecode can be inaccurate in such case.
 350     Method* callee = attached_method_before_pc(pc);
 351     bool has_receiver = false;
 352     bool has_appendix = false;
 353     Symbol* signature = NULL;
 354     if (callee != NULL) {
 355       has_receiver = !(callee->access_flags().is_static());
 356       has_appendix = false;
 357       signature = callee->signature();
 358 
 359       // If value types are passed as fields, use the extended signature
 360       // which contains the types of all (oop) fields of the value type.
 361       if (callee->has_scalarized_args()) {
 362         const GrowableArray<SigEntry>* sig = callee->adapter()->get_sig_cc();
 363         assert(sig != NULL, "sig should never be null");
 364         signature = SigEntry::create_symbol(sig);
 365         has_receiver = false; // The extended signature contains the receiver type
 366       }
 367     } else {
 368       SimpleScopeDesc ssd(this, pc);
 369       Bytecode_invoke call(ssd.method(), ssd.bci());
 370       has_receiver = call.has_receiver();
 371       has_appendix = call.has_appendix();
 372       signature = call.signature();
 373     }
 374 
 375     fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f);
 376   }
 377 }
 378 
 379 Method* CompiledMethod::attached_method(address call_instr) {
 380   assert(code_contains(call_instr), "not part of the nmethod");
 381   RelocIterator iter(this, call_instr, call_instr + 1);




 341 }
 342 
 343 // Method that knows how to preserve outgoing arguments at call. This method must be
 344 // called with a frame corresponding to a Java invoke
 345 void CompiledMethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
 346   if (method() != NULL && !method()->is_native()) {
 347     address pc = fr.pc();
 348     // The method attached by JIT-compilers should be used, if present.
 349     // Bytecode can be inaccurate in such case.
 350     Method* callee = attached_method_before_pc(pc);
 351     bool has_receiver = false;
 352     bool has_appendix = false;
 353     Symbol* signature = NULL;
 354     if (callee != NULL) {
 355       has_receiver = !(callee->access_flags().is_static());
 356       has_appendix = false;
 357       signature = callee->signature();
 358 
 359       // If value types are passed as fields, use the extended signature
 360       // which contains the types of all (oop) fields of the value type.
 361       if (this->is_compiled_by_c2() && callee->has_scalarized_args()) {
 362         const GrowableArray<SigEntry>* sig = callee->adapter()->get_sig_cc();
 363         assert(sig != NULL, "sig should never be null");
 364         signature = SigEntry::create_symbol(sig);
 365         has_receiver = false; // The extended signature contains the receiver type
 366       }
 367     } else {
 368       SimpleScopeDesc ssd(this, pc);
 369       Bytecode_invoke call(ssd.method(), ssd.bci());
 370       has_receiver = call.has_receiver();
 371       has_appendix = call.has_appendix();
 372       signature = call.signature();
 373     }
 374 
 375     fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f);
 376   }
 377 }
 378 
 379 Method* CompiledMethod::attached_method(address call_instr) {
 380   assert(code_contains(call_instr), "not part of the nmethod");
 381   RelocIterator iter(this, call_instr, call_instr + 1);


< prev index next >