--- old/src/hotspot/share/oops/constantPool.hpp 2018-03-08 13:54:11.937764963 -0500 +++ new/src/hotspot/share/oops/constantPool.hpp 2018-03-08 13:54:11.140459416 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -65,9 +65,8 @@ } }; -// This represents a (JVM_CONSTANT_Class, JVM_CONSTANT_UnresolvedClass or JVM_CONSTANT_UnresolvedClassInError) or -// (JVM_CONSTANT_Value, JVM_CONSTANT_UnresolvedValue or JVM_CONSTANT_UnresolvedValueInError) -// slot in the constant pool. +// This represents a JVM_CONSTANT_Class, JVM_CONSTANT_UnresolvedClass, or +// JVM_CONSTANT_UnresolvedClassInError slot in the constant pool. class CPKlassSlot VALUE_OBJ_CLASS_SPEC { // cp->symbol_at(_name_index) gives the name of the class. int _name_index; @@ -146,8 +145,7 @@ CPSlot slot_at(int which) const { assert(is_within_bounds(which), "index out of bounds"); - assert(!tag_at(which).is_unresolved_klass() && !tag_at(which).is_unresolved_klass_in_error() && - !tag_at(which).is_unresolved_value_type() && !tag_at(which).is_unresolved_value_type_in_error(), "Corrupted constant pool"); + assert(!tag_at(which).is_unresolved_klass() && !tag_at(which).is_unresolved_klass_in_error(), "Corrupted constant pool"); // Uses volatile because the klass slot changes without a lock. intptr_t adr = OrderAccess::load_acquire(obj_at_addr_raw(which)); assert(adr != 0 || which == 0, "cp entry for klass should not be zero"); @@ -280,12 +278,6 @@ *int_at_addr(which) = name_index; } - // For temporary use while constructing constant pool. Used during a retransform/class redefinition as well. - void value_type_index_at_put(int which, int name_index) { - tag_at_put(which, JVM_CONSTANT_ValueIndex); - *int_at_addr(which) = name_index; - } - // Anonymous class support: void klass_at_put(int class_index, int name_index, int resolved_klass_index, Klass* k, Symbol* name); void klass_at_put(int class_index, Klass* k); @@ -299,15 +291,6 @@ build_int_from_shorts((jushort)resolved_klass_index, (jushort)name_index); } - void unresolved_value_type_at_put(int which, int name_index, int resolved_klass_index) { - release_tag_at_put(which, JVM_CONSTANT_UnresolvedValue); - - assert((name_index & 0xffff0000) == 0, "must be"); - assert((resolved_klass_index & 0xffff0000) == 0, "must be"); - *int_at_addr(which) = - build_int_from_shorts((jushort)resolved_klass_index, (jushort)name_index); - } - void method_handle_index_at_put(int which, int ref_kind, int ref_index) { tag_at_put(which, JVM_CONSTANT_MethodHandle); *int_at_addr(which) = ((jint) ref_index<<16) | ref_kind; @@ -413,8 +396,7 @@ } CPKlassSlot klass_slot_at(int which) const { - assert(tag_at(which).is_unresolved_klass() || tag_at(which).is_klass() || - tag_at(which).is_unresolved_value_type() || tag_at(which).is_value_type(), + assert(tag_at(which).is_unresolved_klass() || tag_at(which).is_klass(), "Corrupted constant pool"); int value = *int_at_addr(which); int name_index = extract_high_short_from_int(value); @@ -428,7 +410,7 @@ } Klass* resolved_klass_at(int which) const { // Used by Compiler - guarantee(tag_at(which).is_klass() || tag_at(which).is_value_type(), "Corrupted constant pool"); + guarantee(tag_at(which).is_klass(), "Corrupted constant pool"); // Must do an acquire here in case another thread resolved the klass // behind our back, lest we later load stale values thru the oop. CPKlassSlot kslot = klass_slot_at(which); @@ -445,11 +427,6 @@ // will be initialized later by a call to initialize_unresolved_klasses(). unresolved_klass_at_put(which, name_index, CPKlassSlot::_temp_resolved_klass_index); } - void temp_unresolved_value_type_at_put(int which, int name_index) { - // Used only during constant pool merging for class redefinition. The resolved klass index - // will be initialized later by a call to initialize_unresolved_klasses(). - unresolved_value_type_at_put(which, name_index, CPKlassSlot::_temp_resolved_klass_index); - } jint int_at(int which) { assert(tag_at(which).is_int(), "Corrupted constant pool"); @@ -899,11 +876,6 @@ return *int_at_addr(which); } - jint value_type_index_at(int which) { - assert(tag_at(which).is_value_type_index(), "Corrupted constant pool"); - return *int_at_addr(which); - } - jint string_index_at(int which) { assert(tag_at(which).is_string_index(), "Corrupted constant pool"); return *int_at_addr(which);