In JDK-8301995, handling of invokedynamic in the constant pool cache was refactored and a regression was introduced in AbstractInterpreter::is_not_reached(). Before the patch the code looked like this:
case Bytecodes::_invokedynamic: {
assert(invoke_bc.has_index_u4(code), "sanity");
int method_index = invoke_bc.get_index_u4(code);
return cpool->invokedynamic_cp_cache_entry_at(method_index)->is_f1_null();
}
The patch introduced this change:
case Bytecodes::_invokedynamic: {
assert(invoke_bc.has_index_u4(code), "sanity");
int method_index = invoke_bc.get_index_u4(code);
return cpool->resolved_indy_entry_at(method_index)->is_resolved();
}
The new return should be negated to match the pre-patch result.
case Bytecodes::_invokedynamic: {
assert(invoke_bc.has_index_u4(code), "sanity");
int method_index = invoke_bc.get_index_u4(code);
return cpool->invokedynamic_cp_cache_entry_at(method_index)->is_f1_null();
}
The patch introduced this change:
case Bytecodes::_invokedynamic: {
assert(invoke_bc.has_index_u4(code), "sanity");
int method_index = invoke_bc.get_index_u4(code);
return cpool->resolved_indy_entry_at(method_index)->is_resolved();
}
The new return should be negated to match the pre-patch result.