--- old/src/share/vm/oops/constantPool.hpp 2017-06-08 09:09:11.633341264 -0400 +++ new/src/share/vm/oops/constantPool.hpp 2017-06-08 09:09:11.529557730 -0400 @@ -545,11 +545,13 @@ } int invoke_dynamic_name_and_type_ref_index_at(int which) { - assert(tag_at(which).is_invoke_dynamic(), "Corrupted constant pool"); + assert(tag_at(which).is_invoke_dynamic() || + tag_at(which).is_invoke_dynamic_in_error(), "Corrupted constant pool"); return extract_high_short_from_int(*int_at_addr(which)); } int invoke_dynamic_bootstrap_specifier_index(int which) { - assert(tag_at(which).value() == JVM_CONSTANT_InvokeDynamic, "Corrupted constant pool"); + assert(tag_at(which).is_invoke_dynamic() || + tag_at(which).is_invoke_dynamic_in_error(), "Corrupted constant pool"); return extract_low_short_from_int(*int_at_addr(which)); } int invoke_dynamic_operand_base(int which) { @@ -647,12 +649,14 @@ int invoke_dynamic_bootstrap_method_ref_index_at(int which) { - assert(tag_at(which).is_invoke_dynamic(), "Corrupted constant pool"); + assert(tag_at(which).is_invoke_dynamic() || + tag_at(which).is_invoke_dynamic_in_error(), "Corrupted constant pool"); int op_base = invoke_dynamic_operand_base(which); return operands()->at(op_base + _indy_bsm_offset); } int invoke_dynamic_argument_count_at(int which) { - assert(tag_at(which).is_invoke_dynamic(), "Corrupted constant pool"); + assert(tag_at(which).is_invoke_dynamic() || + tag_at(which).is_invoke_dynamic_in_error(), "Corrupted constant pool"); int op_base = invoke_dynamic_operand_base(which); int argc = operands()->at(op_base + _indy_argc_offset); DEBUG_ONLY(int end_offset = op_base + _indy_argv_offset + argc; @@ -853,11 +857,13 @@ static oop resolve_bootstrap_specifier_at_impl(const constantPoolHandle& this_cp, int index, TRAPS); // Exception handling - static void throw_resolution_error(const constantPoolHandle& this_cp, int which, TRAPS); static Symbol* exception_message(const constantPoolHandle& this_cp, int which, constantTag tag, oop pending_exception); - static void save_and_throw_exception(const constantPoolHandle& this_cp, int which, constantTag tag, TRAPS); public: + // Exception handling + static void throw_resolution_error(const constantPoolHandle& this_cp, int which, TRAPS); + static void save_and_throw_exception(const constantPoolHandle& this_cp, int which, constantTag tag, TRAPS); + // Merging ConstantPool* support: bool compare_entry_to(int index1, const constantPoolHandle& cp2, int index2, TRAPS); void copy_cp_to(int start_i, int end_i, const constantPoolHandle& to_cp, int to_i, TRAPS) {