542 if (scratch_i != *merge_cp_length_p) {
543 // The new entry in *merge_cp_p is at a different index than
544 // the new entry in scratch_cp so we need to map the index values.
545 map_index(scratch_cp, scratch_i, *merge_cp_length_p);
546 }
547 (*merge_cp_length_p)++;
548 } break;
549
550 // At this stage, Class or UnresolvedClass could be in scratch_cp, but not
551 // ClassIndex
552 case JVM_CONSTANT_ClassIndex: // fall through
553
554 // Invalid is used as the tag for the second constant pool entry
555 // occupied by JVM_CONSTANT_Double or JVM_CONSTANT_Long. It should
556 // not be seen by itself.
557 case JVM_CONSTANT_Invalid: // fall through
558
559 // At this stage, String could be here, but not StringIndex
560 case JVM_CONSTANT_StringIndex: // fall through
561
562 // At this stage JVM_CONSTANT_UnresolvedClassInError should not be
563 // here
564 case JVM_CONSTANT_UnresolvedClassInError: // fall through
565
566 default:
567 {
568 // leave a breadcrumb
569 jbyte bad_value = scratch_cp->tag_at(scratch_i).value();
570 ShouldNotReachHere();
571 } break;
572 } // end switch tag value
573 } // end append_entry()
574
575
576 int VM_RedefineClasses::find_or_append_indirect_entry(const constantPoolHandle& scratch_cp,
577 int ref_i, constantPoolHandle *merge_cp_p, int *merge_cp_length_p, TRAPS) {
578
579 int new_ref_i = ref_i;
580 bool match = (ref_i < *merge_cp_length_p) &&
581 scratch_cp->compare_entry_to(ref_i, *merge_cp_p, ref_i, THREAD);
582
583 if (!match) {
|
542 if (scratch_i != *merge_cp_length_p) {
543 // The new entry in *merge_cp_p is at a different index than
544 // the new entry in scratch_cp so we need to map the index values.
545 map_index(scratch_cp, scratch_i, *merge_cp_length_p);
546 }
547 (*merge_cp_length_p)++;
548 } break;
549
550 // At this stage, Class or UnresolvedClass could be in scratch_cp, but not
551 // ClassIndex
552 case JVM_CONSTANT_ClassIndex: // fall through
553
554 // Invalid is used as the tag for the second constant pool entry
555 // occupied by JVM_CONSTANT_Double or JVM_CONSTANT_Long. It should
556 // not be seen by itself.
557 case JVM_CONSTANT_Invalid: // fall through
558
559 // At this stage, String could be here, but not StringIndex
560 case JVM_CONSTANT_StringIndex: // fall through
561
562 // At this stage JVM_CONSTANT_UnresolvedClassInError should not be here
563 case JVM_CONSTANT_UnresolvedClassInError: // fall through
564
565 default:
566 {
567 // leave a breadcrumb
568 jbyte bad_value = scratch_cp->tag_at(scratch_i).value();
569 ShouldNotReachHere();
570 } break;
571 } // end switch tag value
572 } // end append_entry()
573
574
575 int VM_RedefineClasses::find_or_append_indirect_entry(const constantPoolHandle& scratch_cp,
576 int ref_i, constantPoolHandle *merge_cp_p, int *merge_cp_length_p, TRAPS) {
577
578 int new_ref_i = ref_i;
579 bool match = (ref_i < *merge_cp_length_p) &&
580 scratch_cp->compare_entry_to(ref_i, *merge_cp_p, ref_i, THREAD);
581
582 if (!match) {
|