< prev index next >
src/share/vm/opto/parse1.cpp
Print this page
rev 9165 : 8141551: C2 can not handle returns with inccompatible interface arrays
@@ -989,17 +989,22 @@
Node* ret_phi = _gvn.transform( _exits.argument(0) );
if (!_exits.control()->is_top() && _gvn.type(ret_phi)->empty()) {
// In case of concurrent class loading, the type we set for the
// ret_phi in build_exits() may have been too optimistic and the
// ret_phi may be top now.
-#ifdef ASSERT
+ // Otherwise, we've encountered an error and have to mark the method as
+ // not compilable. Just using an assertion instead would be dangerous
+ // as this could lead to an infinite compile loop in non-debug builds.
{
MutexLockerEx ml(Compile_lock, Mutex::_no_safepoint_check_flag);
- assert(ret_type->isa_ptr() && C->env()->system_dictionary_modification_counter_changed(), "return value must be well defined");
- }
-#endif
+ if (C->env()->system_dictionary_modification_counter_changed()) {
C->record_failure(C2Compiler::retry_class_loading_during_parsing());
+ } else {
+ C->record_method_not_compilable("Can't determine return type.");
+ }
+ }
+ return;
}
_exits.push_node(ret_type->basic_type(), ret_phi);
}
// Note: Logic for creating and optimizing the ReturnNode is in Compile.
< prev index next >