< prev index next >

src/hotspot/share/code/compiledMethod.cpp

Print this page

        

*** 37,46 **** --- 37,47 ---- #include "oops/methodData.hpp" #include "oops/method.inline.hpp" #include "prims/methodHandles.hpp" #include "runtime/handles.inline.hpp" #include "runtime/mutexLocker.hpp" + #include "runtime/sharedRuntime.hpp" CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments) : CodeBlob(name, type, layout, frame_complete_offset, frame_size, oop_maps, caller_must_gc_arguments),
*** 274,292 **** ScopeDesc* CompiledMethod::scope_desc_at(address pc) { PcDesc* pd = pc_desc_at(pc); guarantee(pd != NULL, "scope must be present"); return new ScopeDesc(this, pd->scope_decode_offset(), pd->obj_decode_offset(), pd->should_reexecute(), pd->rethrow_exception(), ! pd->return_oop()); } ScopeDesc* CompiledMethod::scope_desc_near(address pc) { PcDesc* pd = pc_desc_near(pc); guarantee(pd != NULL, "scope must be present"); return new ScopeDesc(this, pd->scope_decode_offset(), pd->obj_decode_offset(), pd->should_reexecute(), pd->rethrow_exception(), ! pd->return_oop()); } address CompiledMethod::oops_reloc_begin() const { // If the method is not entrant or zombie then a JMP is plastered over the // first few bytes. If an oop in the old code was there, that oop --- 275,293 ---- ScopeDesc* CompiledMethod::scope_desc_at(address pc) { PcDesc* pd = pc_desc_at(pc); guarantee(pd != NULL, "scope must be present"); return new ScopeDesc(this, pd->scope_decode_offset(), pd->obj_decode_offset(), pd->should_reexecute(), pd->rethrow_exception(), ! pd->return_oop(), pd->return_vt()); } ScopeDesc* CompiledMethod::scope_desc_near(address pc) { PcDesc* pd = pc_desc_near(pc); guarantee(pd != NULL, "scope must be present"); return new ScopeDesc(this, pd->scope_decode_offset(), pd->obj_decode_offset(), pd->should_reexecute(), pd->rethrow_exception(), ! pd->return_oop(), pd->return_vt()); } address CompiledMethod::oops_reloc_begin() const { // If the method is not entrant or zombie then a JMP is plastered over the // first few bytes. If an oop in the old code was there, that oop
*** 342,364 **** // Method that knows how to preserve outgoing arguments at call. This method must be // called with a frame corresponding to a Java invoke void CompiledMethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { if (method() != NULL && !method()->is_native()) { address pc = fr.pc(); - SimpleScopeDesc ssd(this, pc); - Bytecode_invoke call(ssd.method(), ssd.bci()); - bool has_receiver = call.has_receiver(); - bool has_appendix = call.has_appendix(); - Symbol* signature = call.signature(); - // The method attached by JIT-compilers should be used, if present. // Bytecode can be inaccurate in such case. Method* callee = attached_method_before_pc(pc); if (callee != NULL) { has_receiver = !(callee->access_flags().is_static()); has_appendix = false; signature = callee->signature(); } fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f); } } --- 343,377 ---- // Method that knows how to preserve outgoing arguments at call. This method must be // called with a frame corresponding to a Java invoke void CompiledMethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { if (method() != NULL && !method()->is_native()) { address pc = fr.pc(); // The method attached by JIT-compilers should be used, if present. // Bytecode can be inaccurate in such case. Method* callee = attached_method_before_pc(pc); + bool has_receiver = false; + bool has_appendix = false; + Symbol* signature = NULL; if (callee != NULL) { has_receiver = !(callee->access_flags().is_static()); has_appendix = false; signature = callee->signature(); + + // If value types are passed as fields, use the extended signature + // which contains the types of all (oop) fields of the value type. + if (callee->has_scalarized_args()) { + const GrowableArray<SigEntry>* sig = callee->adapter()->get_sig_cc(); + assert(sig != NULL, "sig should never be null"); + signature = SigEntry::create_symbol(sig); + has_receiver = false; // The extended signature contains the receiver type + } + } else { + SimpleScopeDesc ssd(this, pc); + Bytecode_invoke call(ssd.method(), ssd.bci()); + has_receiver = call.has_receiver(); + has_appendix = call.has_appendix(); + signature = call.signature(); } fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f); } }
< prev index next >