< prev index next >

src/hotspot/share/code/compiledMethod.cpp

Print this page

340     return;
341   }
342 
343   // handle the case of an anchor explicitly set in continuation code that doesn't have a callee
344   JavaThread* thread = reg_map->thread();
345   if (thread->has_last_Java_frame() && fr.sp() == thread->last_Java_sp()) {
346     return;
347   }
348 
349   if (!method()->is_native()) {
350     address pc = fr.pc();
351     bool has_receiver, has_appendix;
352     Symbol* signature;
353 
354     // The method attached by JIT-compilers should be used, if present.
355     // Bytecode can be inaccurate in such case.
356     Method* callee = attached_method_before_pc(pc);
357     if (callee != nullptr) {
358       has_receiver = !(callee->access_flags().is_static());
359       has_appendix = false;
360       signature    = callee->signature();











361     } else {
362       SimpleScopeDesc ssd(this, pc);
363 
364       Bytecode_invoke call(methodHandle(Thread::current(), ssd.method()), ssd.bci());
365       has_receiver = call.has_receiver();
366       has_appendix = call.has_appendix();
367       signature    = call.signature();
368     }
369 
370     fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f);
371   } else if (method()->is_continuation_enter_intrinsic()) {
372     // This method only calls Continuation.enter()
373     Symbol* signature = vmSymbols::continuationEnter_signature();
374     fr.oops_compiled_arguments_do(signature, false, false, reg_map, f);
375   }
376 }
377 
378 Method* CompiledMethod::attached_method(address call_instr) {
379   assert(code_contains(call_instr), "not part of the nmethod");
380   RelocIterator iter(this, call_instr, call_instr + 1);

340     return;
341   }
342 
343   // handle the case of an anchor explicitly set in continuation code that doesn't have a callee
344   JavaThread* thread = reg_map->thread();
345   if (thread->has_last_Java_frame() && fr.sp() == thread->last_Java_sp()) {
346     return;
347   }
348 
349   if (!method()->is_native()) {
350     address pc = fr.pc();
351     bool has_receiver, has_appendix;
352     Symbol* signature;
353 
354     // The method attached by JIT-compilers should be used, if present.
355     // Bytecode can be inaccurate in such case.
356     Method* callee = attached_method_before_pc(pc);
357     if (callee != nullptr) {
358       has_receiver = !(callee->access_flags().is_static());
359       has_appendix = false;
360       signature = callee->signature();
361 
362       // If inline types are passed as fields, use the extended signature
363       // which contains the types of all (oop) fields of the inline type.
364       if (is_compiled_by_c2() && callee->has_scalarized_args()) {
365         const GrowableArray<SigEntry>* sig = callee->adapter()->get_sig_cc();
366         assert(sig != nullptr, "sig should never be null");
367         TempNewSymbol tmp_sig = SigEntry::create_symbol(sig);
368         has_receiver = false; // The extended signature contains the receiver type
369         fr.oops_compiled_arguments_do(tmp_sig, has_receiver, has_appendix, reg_map, f);
370         return;
371       }
372     } else {
373       SimpleScopeDesc ssd(this, pc);
374 
375       Bytecode_invoke call(methodHandle(Thread::current(), ssd.method()), ssd.bci());
376       has_receiver = call.has_receiver();
377       has_appendix = call.has_appendix();
378       signature    = call.signature();
379     }
380 
381     fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f);
382   } else if (method()->is_continuation_enter_intrinsic()) {
383     // This method only calls Continuation.enter()
384     Symbol* signature = vmSymbols::continuationEnter_signature();
385     fr.oops_compiled_arguments_do(signature, false, false, reg_map, f);
386   }
387 }
388 
389 Method* CompiledMethod::attached_method(address call_instr) {
390   assert(code_contains(call_instr), "not part of the nmethod");
391   RelocIterator iter(this, call_instr, call_instr + 1);
< prev index next >