< prev index next >

src/share/vm/prims/jvmtiRedefineClasses.cpp

Print this page
rev 9088 : 8139040: Fix initializations before ShouldNotReachHere() etc. and enable -Wuninitialized on linux.


 319         // The new entry in *merge_cp_p is at a different index than
 320         // the new entry in scratch_cp so we need to map the index values.
 321         map_index(scratch_cp, scratch_i, *merge_cp_length_p);
 322       }
 323       (*merge_cp_length_p)++;
 324     } break;
 325 
 326     // this is a double-indirect CP entry so it needs special handling
 327     case JVM_CONSTANT_Fieldref:           // fall through
 328     case JVM_CONSTANT_InterfaceMethodref: // fall through
 329     case JVM_CONSTANT_Methodref:
 330     {
 331       int klass_ref_i = scratch_cp->uncached_klass_ref_index_at(scratch_i);
 332       int new_klass_ref_i = find_or_append_indirect_entry(scratch_cp, klass_ref_i,
 333                                                           merge_cp_p, merge_cp_length_p, THREAD);
 334 
 335       int name_and_type_ref_i = scratch_cp->uncached_name_and_type_ref_index_at(scratch_i);
 336       int new_name_and_type_ref_i = find_or_append_indirect_entry(scratch_cp, name_and_type_ref_i,
 337                                                           merge_cp_p, merge_cp_length_p, THREAD);
 338 
 339       const char *entry_name;
 340       switch (scratch_cp->tag_at(scratch_i).value()) {
 341       case JVM_CONSTANT_Fieldref:
 342         entry_name = "Fieldref";
 343         (*merge_cp_p)->field_at_put(*merge_cp_length_p, new_klass_ref_i,
 344           new_name_and_type_ref_i);
 345         break;
 346       case JVM_CONSTANT_InterfaceMethodref:
 347         entry_name = "IFMethodref";
 348         (*merge_cp_p)->interface_method_at_put(*merge_cp_length_p,
 349           new_klass_ref_i, new_name_and_type_ref_i);
 350         break;
 351       case JVM_CONSTANT_Methodref:
 352         entry_name = "Methodref";
 353         (*merge_cp_p)->method_at_put(*merge_cp_length_p, new_klass_ref_i,
 354           new_name_and_type_ref_i);
 355         break;
 356       default:
 357         guarantee(false, "bad switch");
 358         break;
 359       }




 319         // The new entry in *merge_cp_p is at a different index than
 320         // the new entry in scratch_cp so we need to map the index values.
 321         map_index(scratch_cp, scratch_i, *merge_cp_length_p);
 322       }
 323       (*merge_cp_length_p)++;
 324     } break;
 325 
 326     // this is a double-indirect CP entry so it needs special handling
 327     case JVM_CONSTANT_Fieldref:           // fall through
 328     case JVM_CONSTANT_InterfaceMethodref: // fall through
 329     case JVM_CONSTANT_Methodref:
 330     {
 331       int klass_ref_i = scratch_cp->uncached_klass_ref_index_at(scratch_i);
 332       int new_klass_ref_i = find_or_append_indirect_entry(scratch_cp, klass_ref_i,
 333                                                           merge_cp_p, merge_cp_length_p, THREAD);
 334 
 335       int name_and_type_ref_i = scratch_cp->uncached_name_and_type_ref_index_at(scratch_i);
 336       int new_name_and_type_ref_i = find_or_append_indirect_entry(scratch_cp, name_and_type_ref_i,
 337                                                           merge_cp_p, merge_cp_length_p, THREAD);
 338 
 339       const char *entry_name = NULL;
 340       switch (scratch_cp->tag_at(scratch_i).value()) {
 341       case JVM_CONSTANT_Fieldref:
 342         entry_name = "Fieldref";
 343         (*merge_cp_p)->field_at_put(*merge_cp_length_p, new_klass_ref_i,
 344           new_name_and_type_ref_i);
 345         break;
 346       case JVM_CONSTANT_InterfaceMethodref:
 347         entry_name = "IFMethodref";
 348         (*merge_cp_p)->interface_method_at_put(*merge_cp_length_p,
 349           new_klass_ref_i, new_name_and_type_ref_i);
 350         break;
 351       case JVM_CONSTANT_Methodref:
 352         entry_name = "Methodref";
 353         (*merge_cp_p)->method_at_put(*merge_cp_length_p, new_klass_ref_i,
 354           new_name_and_type_ref_i);
 355         break;
 356       default:
 357         guarantee(false, "bad switch");
 358         break;
 359       }


< prev index next >