--- old/src/hotspot/share/prims/jvmtiRedefineClasses.cpp 2018-03-08 13:54:20.928829250 -0500 +++ new/src/hotspot/share/prims/jvmtiRedefineClasses.cpp 2018-03-08 13:54:20.180763182 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -332,29 +332,6 @@ (*merge_cp_length_p)++; } break; - // this is an indirect CP entry so it needs special handling - case JVM_CONSTANT_Value: - case JVM_CONSTANT_UnresolvedValue: - { - int name_i = scratch_cp->klass_name_index_at(scratch_i); - int new_name_i = find_or_append_indirect_entry(scratch_cp, name_i, merge_cp_p, - merge_cp_length_p, THREAD); - - if (new_name_i != name_i) { - log_trace(redefine, class, constantpool) - ("Value type entry@%d name_index change: %d to %d", - *merge_cp_length_p, name_i, new_name_i); - } - - (*merge_cp_p)->temp_unresolved_value_type_at_put(*merge_cp_length_p, new_name_i); - if (scratch_i != *merge_cp_length_p) { - // The new entry in *merge_cp_p is at a different index than - // the new entry in scratch_cp so we need to map the index values. - map_index(scratch_cp, scratch_i, *merge_cp_length_p); - } - (*merge_cp_length_p)++; - } break; - // these are direct CP entries so they can be directly appended, // but double and long take two constant pool entries case JVM_CONSTANT_Double: // fall through @@ -556,7 +533,6 @@ // At this stage, Class or UnresolvedClass could be in scratch_cp, but not // ClassIndex case JVM_CONSTANT_ClassIndex: // fall through - case JVM_CONSTANT_ValueIndex: // fall through // Invalid is used as the tag for the second constant pool entry // occupied by JVM_CONSTANT_Double or JVM_CONSTANT_Long. It should @@ -569,9 +545,6 @@ // At this stage JVM_CONSTANT_UnresolvedClassInError should not be here case JVM_CONSTANT_UnresolvedClassInError: // fall through - // At this stage JVM_CONSTANT_UnresolvedValueInError should not be here - case JVM_CONSTANT_UnresolvedValueInError: // fall through - default: { // leave a breadcrumb @@ -1019,14 +992,12 @@ int index1, const constantPoolHandle& cp2, int index2) { jbyte t1 = cp1->tag_at(index1).value(); - if (t1 != JVM_CONSTANT_Class && t1 != JVM_CONSTANT_UnresolvedClass && - t1 != JVM_CONSTANT_Value && t1 != JVM_CONSTANT_UnresolvedValue) { + if (t1 != JVM_CONSTANT_Class && t1 != JVM_CONSTANT_UnresolvedClass) { return false; // wrong entry type; not our special case } jbyte t2 = cp2->tag_at(index2).value(); - if (t2 != JVM_CONSTANT_Class && t2 != JVM_CONSTANT_UnresolvedClass && - t2 != JVM_CONSTANT_Value && t2 != JVM_CONSTANT_UnresolvedValue) { + if (t2 != JVM_CONSTANT_Class && t2 != JVM_CONSTANT_UnresolvedClass) { return false; // wrong entry type; not our special case } @@ -1310,7 +1281,6 @@ // perfect fit for ConstantPool*::copy_cp_to(), but we need to // handle one special case: // - revert JVM_CONSTANT_Class to JVM_CONSTANT_UnresolvedClass - // - revert JVM_CONSTANT_Value to JVM_CONSTANT_UnresolvedValue // This will make verification happy. int old_i; // index into old_cp @@ -1329,15 +1299,6 @@ old_cp->klass_name_index_at(old_i)); break; - case JVM_CONSTANT_Value: - case JVM_CONSTANT_UnresolvedValue: - // revert the copy to JVM_CONSTANT_UnresolvedValue - // May be resolving while calling this so do the same for - // JVM_CONSTANT_UnresolvedValue (klass_name_at() deals with transition) - (*merge_cp_p)->temp_unresolved_value_type_at_put(old_i, - old_cp->klass_name_index_at(old_i)); - break; - case JVM_CONSTANT_Double: case JVM_CONSTANT_Long: // just copy the entry to *merge_cp_p, but double and long take