@@ -126,46 +126,47 @@ bool ci_lazy_methodst::operator()(
126126
127127 bool any_new_classes = true ;
128128 while (any_new_classes)
129- {bool any_new_methods = true ;
130- while (any_new_methods)
131129 {
132- any_new_methods= false ;
133- while (!methods_to_convert_later. empty () )
130+ bool any_new_methods = true ;
131+ while (any_new_methods )
134132 {
135- std::unordered_set<irep_idt> methods_to_convert;
136- std::swap (methods_to_convert, methods_to_convert_later);
137- for (const auto &mname : methods_to_convert)
133+ any_new_methods = false ;
134+ while (!methods_to_convert_later.empty ())
138135 {
139- if (!methods_already_populated.insert (mname).second )
140- continue ;
141- debug () << " CI lazy methods: elaborate " << mname << eom;
142- if (
143- method_converter (
144- mname,
145- // Note this wraps *references* to methods_to_convert_later &
146- // instantiated_classes
147- ci_lazy_methods_neededt (
148- methods_to_convert_later, instantiated_classes, symbol_table)))
149- {
150- // Couldn't convert this function
151- continue ;
152- }
153- const exprt &method_body = symbol_table.lookup_ref (mname).value ;
154-
155- gather_virtual_callsites (method_body, virtual_function_calls);
156-
157- if (!class_initializer_seen && references_class_model (method_body))
136+ std::unordered_set<irep_idt> methods_to_convert;
137+ std::swap (methods_to_convert, methods_to_convert_later);
138+ for (const auto &mname : methods_to_convert)
158139 {
159- class_initializer_seen = true ;
160- irep_idt initializer_signature =
161- get_java_class_literal_initializer_signature ();
162- if (symbol_table.has_symbol (initializer_signature))
163- methods_to_convert_later.insert (initializer_signature);
140+ if (!methods_already_populated.insert (mname).second )
141+ continue ;
142+ debug () << " CI lazy methods: elaborate " << mname << eom;
143+ if (
144+ method_converter (
145+ mname,
146+ // Note this wraps *references* to methods_to_convert_later &
147+ // instantiated_classes
148+ ci_lazy_methods_neededt (
149+ methods_to_convert_later, instantiated_classes, symbol_table)))
150+ {
151+ // Couldn't convert this function
152+ continue ;
153+ }
154+ const exprt &method_body = symbol_table.lookup_ref (mname).value ;
155+
156+ gather_virtual_callsites (method_body, virtual_function_calls);
157+
158+ if (!class_initializer_seen && references_class_model (method_body))
159+ {
160+ class_initializer_seen = true ;
161+ irep_idt initializer_signature =
162+ get_java_class_literal_initializer_signature ();
163+ if (symbol_table.has_symbol (initializer_signature))
164+ methods_to_convert_later.insert (initializer_signature);
165+ }
166+
167+ any_new_methods = true ;
164168 }
165-
166- any_new_methods=true ;
167169 }
168- }
169170
170171 // Given the object types we now know may be created, populate more
171172 // possible virtual function call targets:
0 commit comments