comparison src/share/vm/opto/output.cpp @ 1253:f70b0d9ab095

6910618: C2: Error: assert(d->is_oop(),"JVM_ArrayCopy: dst not an oop") Summary: Mark in PcDesc call sites which return oop and save the result oop across objects reallocation during deoptimization. Reviewed-by: never
author kvn
date Tue, 09 Feb 2010 01:31:13 -0800
parents 18a389214829
children b4b440360f1e
comparison
equal deleted inserted replaced
1252:f516d5d7a019 1253:f70b0d9ab095
793 assert( is_node_getting_a_safepoint(mach), "logic does not match; false negative"); 793 assert( is_node_getting_a_safepoint(mach), "logic does not match; false negative");
794 #endif 794 #endif
795 795
796 int safepoint_pc_offset = current_offset; 796 int safepoint_pc_offset = current_offset;
797 bool is_method_handle_invoke = false; 797 bool is_method_handle_invoke = false;
798 bool return_oop = false;
798 799
799 // Add the safepoint in the DebugInfoRecorder 800 // Add the safepoint in the DebugInfoRecorder
800 if( !mach->is_MachCall() ) { 801 if( !mach->is_MachCall() ) {
801 mcall = NULL; 802 mcall = NULL;
802 debug_info()->add_safepoint(safepoint_pc_offset, sfn->_oop_map); 803 debug_info()->add_safepoint(safepoint_pc_offset, sfn->_oop_map);
805 806
806 // Is the call a MethodHandle call? 807 // Is the call a MethodHandle call?
807 if (mcall->is_MachCallJava()) 808 if (mcall->is_MachCallJava())
808 is_method_handle_invoke = mcall->as_MachCallJava()->_method_handle_invoke; 809 is_method_handle_invoke = mcall->as_MachCallJava()->_method_handle_invoke;
809 810
811 // Check if a call returns an object.
812 if (mcall->return_value_is_used() &&
813 mcall->tf()->range()->field_at(TypeFunc::Parms)->isa_ptr()) {
814 return_oop = true;
815 }
810 safepoint_pc_offset += mcall->ret_addr_offset(); 816 safepoint_pc_offset += mcall->ret_addr_offset();
811 debug_info()->add_safepoint(safepoint_pc_offset, mcall->_oop_map); 817 debug_info()->add_safepoint(safepoint_pc_offset, mcall->_oop_map);
812 } 818 }
813 819
814 // Loop over the JVMState list to add scope information 820 // Loop over the JVMState list to add scope information
917 ciMethod* scope_method = method ? method : _method; 923 ciMethod* scope_method = method ? method : _method;
918 // Describe the scope here 924 // Describe the scope here
919 assert(jvms->bci() >= InvocationEntryBci && jvms->bci() <= 0x10000, "must be a valid or entry BCI"); 925 assert(jvms->bci() >= InvocationEntryBci && jvms->bci() <= 0x10000, "must be a valid or entry BCI");
920 assert(!jvms->should_reexecute() || depth == max_depth, "reexecute allowed only for the youngest"); 926 assert(!jvms->should_reexecute() || depth == max_depth, "reexecute allowed only for the youngest");
921 // Now we can describe the scope. 927 // Now we can describe the scope.
922 debug_info()->describe_scope(safepoint_pc_offset, scope_method, jvms->bci(), jvms->should_reexecute(), is_method_handle_invoke, locvals, expvals, monvals); 928 debug_info()->describe_scope(safepoint_pc_offset, scope_method, jvms->bci(), jvms->should_reexecute(), is_method_handle_invoke, return_oop, locvals, expvals, monvals);
923 } // End jvms loop 929 } // End jvms loop
924 930
925 // Mark the end of the scope set. 931 // Mark the end of the scope set.
926 debug_info()->end_safepoint(safepoint_pc_offset); 932 debug_info()->end_safepoint(safepoint_pc_offset);
927 } 933 }