@@ -48,14 +48,12 @@ ci_lazy_methodst::ci_lazy_methodst(
48
48
// / \param symbol_table: global symbol table
49
49
// / \param [out] lazy_methods: map from method names to relevant symbol and
50
50
// / parsed-method objects.
51
+ // / \param method_converter: Function for converting methods on demand.
51
52
// / \return Returns false on success
52
53
bool ci_lazy_methodst::operator ()(
53
54
symbol_tablet &symbol_table,
54
55
lazy_methodst &lazy_methods,
55
- std::function<void (
56
- const symbolt &,
57
- const java_bytecode_parse_treet::methodt &,
58
- ci_lazy_methods_neededt)> method_converter)
56
+ method_convertert method_converter)
59
57
{
60
58
std::vector<irep_idt> method_worklist1;
61
59
std::vector<irep_idt> method_worklist2;
@@ -117,7 +115,7 @@ bool ci_lazy_methodst::operator()(
117
115
std::set<irep_idt> methods_already_populated;
118
116
std::vector<const code_function_callt *> virtual_callsites;
119
117
120
- bool any_new_methods;
118
+ bool any_new_methods= false ;
121
119
do
122
120
{
123
121
any_new_methods=false ;
@@ -251,9 +249,6 @@ void ci_lazy_methodst::resolve_method_names(
251
249
// / \param entry_points: list of fully-qualified function names that
252
250
// / we should assume are reachable
253
251
// / \param ns: global namespace
254
- // / \param ch: global class hierarchy
255
- // / \param pointer_type_selector: The pointer_type_selector used to find out
256
- // / what other classes may be used for pointers
257
252
// / \param [out] lazy_methods: Populated with all Java reference types whose
258
253
// / references may be passed, directly or indirectly, to any of the functions
259
254
// / in `entry_points`.
@@ -289,7 +284,6 @@ void ci_lazy_methodst::initialize_needed_classes(
289
284
// / `initialize_needed_classes` for more details.
290
285
// / \param pointer_type: The type to gather methods for.
291
286
// / \param ns: global namespace
292
- // / \param ch: global class hierarchy
293
287
// / \param [out] lazy_methods: Populated with all Java reference types whose
294
288
// / references may be passed, directly or indirectly, to any of the functions
295
289
// / in `entry_points
@@ -308,7 +302,7 @@ void ci_lazy_methodst::initialize_needed_classes_from_pointer(
308
302
309
303
// / Get places where virtual functions are called.
310
304
// / \param e: expression tree to search
311
- // / \param [out] results : filled with pointers to each function call within
305
+ // / \param [out] result : filled with pointers to each function call within
312
306
// / e that calls a virtual function.
313
307
void ci_lazy_methodst::gather_virtual_callsites (
314
308
const exprt &e,
@@ -367,10 +361,10 @@ void ci_lazy_methodst::get_virtual_method_targets(
367
361
needed_methods.push_back (self_method);
368
362
}
369
363
370
- auto child_classes=class_hierarchy.get_children_trans (call_class);
364
+ const auto child_classes=class_hierarchy.get_children_trans (call_class);
371
365
for (const auto &child_class : child_classes)
372
366
{
373
- auto child_method=
367
+ const auto child_method=
374
368
get_virtual_method_target (
375
369
needed_classes,
376
370
call_basename,
@@ -410,7 +404,8 @@ void ci_lazy_methodst::gather_needed_globals(
410
404
// on an opaque type (i.e. we don't have the class definition at this point)
411
405
// and will be created during the typecheck phase.
412
406
// We don't mark it as 'needed' as it doesn't exist yet to keep.
413
- auto findit=symbol_table.symbols .find (to_symbol_expr (e).get_identifier ());
407
+ const auto findit=
408
+ symbol_table.symbols .find (to_symbol_expr (e).get_identifier ());
414
409
if (findit!=symbol_table.symbols .end () &&
415
410
findit->second .is_static_lifetime )
416
411
{
0 commit comments