< prev index next >

src/share/vm/prims/jvmtiRedefineClasses.cpp

Print this page
rev 9067 : 8139040: Fix initializations before ShouldNotReachHere()


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




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


< prev index next >