@@ -1037,6 +1037,7 @@ bool java_bytecode_languaget::convert_single_method(
1037
1037
// Nothing to do if body is already loaded
1038
1038
if (symbol.value .is_not_nil ())
1039
1039
return false ;
1040
+ INVARIANT (declaring_class (symbol), " Method must have a declaring class." );
1040
1041
1041
1042
// Get bytecode for specified function if we have it
1042
1043
method_bytecodet::opt_reft cmb = method_bytecode.get (function_id);
@@ -1060,6 +1061,8 @@ bool java_bytecode_languaget::convert_single_method(
1060
1061
// Add these to the needed_lazy_methods collection
1061
1062
notify_static_method_calls (generated_code, needed_lazy_methods);
1062
1063
writable_symbol.value = std::move (generated_code);
1064
+ INVARIANT (
1065
+ declaring_class (writable_symbol), " Method must have a declaring class." );
1063
1066
return false ;
1064
1067
}
1065
1068
else if (
@@ -1103,6 +1106,8 @@ bool java_bytecode_languaget::convert_single_method(
1103
1106
// function:
1104
1107
notify_static_method_calls (
1105
1108
to_code (writable_symbol.value ), needed_lazy_methods);
1109
+ INVARIANT (
1110
+ declaring_class (writable_symbol), " Method must have a declaring class." );
1106
1111
return false ;
1107
1112
}
1108
1113
@@ -1121,6 +1126,7 @@ bool java_bytecode_languaget::convert_single_method(
1121
1126
string_preprocess,
1122
1127
class_hierarchy,
1123
1128
threading_support);
1129
+ INVARIANT (declaring_class (symbol), " Method must have a declaring class." );
1124
1130
return false ;
1125
1131
}
1126
1132
@@ -1144,6 +1150,7 @@ bool java_bytecode_languaget::convert_single_method(
1144
1150
needed_lazy_methods->add_all_needed_classes (*pointer_return_type);
1145
1151
}
1146
1152
1153
+ INVARIANT (declaring_class (symbol), " Method must have a declaring class." );
1147
1154
return true ;
1148
1155
}
1149
1156
0 commit comments