@@ -824,7 +824,7 @@ static void gather_symbol_live_ranges(
824
824
825
825
/* ******************************************************************\
826
826
827
- Function: java_bytecode_convert_methodt::convert_instructions
827
+ Function: get_bytecode_type_width
828
828
829
829
Inputs:
830
830
@@ -841,6 +841,18 @@ static unsigned get_bytecode_type_width(const typet &ty)
841
841
return ty.get_unsigned_int (ID_width);
842
842
}
843
843
844
+ /* ******************************************************************\
845
+
846
+ Function: java_bytecode_convert_methodt::convert_instructions
847
+
848
+ Inputs:
849
+
850
+ Outputs:
851
+
852
+ Purpose:
853
+
854
+ \*******************************************************************/
855
+
844
856
codet java_bytecode_convert_methodt::convert_instructions (
845
857
const methodt &method,
846
858
const code_typet &method_type)
@@ -1165,8 +1177,8 @@ codet java_bytecode_convert_methodt::convert_instructions(
1165
1177
if (as_string (arg0.get (ID_identifier))
1166
1178
.find (" <init>" )!=std::string::npos)
1167
1179
{
1168
- if (needed_classes )
1169
- needed_classes-> insert (classname);
1180
+ if (lazy_methods )
1181
+ lazy_methods-> add_needed_class (classname);
1170
1182
code_type.set (ID_constructor, true );
1171
1183
}
1172
1184
else
@@ -1257,8 +1269,8 @@ codet java_bytecode_convert_methodt::convert_instructions(
1257
1269
{
1258
1270
// static binding
1259
1271
call.function ()=symbol_exprt (arg0.get (ID_identifier), arg0.type ());
1260
- if (needed_methods )
1261
- needed_methods-> push_back (arg0.get (ID_identifier));
1272
+ if (lazy_methods )
1273
+ lazy_methods-> add_needed_method (arg0.get (ID_identifier));
1262
1274
}
1263
1275
1264
1276
call.function ().add_source_location ()=loc;
@@ -1794,9 +1806,9 @@ codet java_bytecode_convert_methodt::convert_instructions(
1794
1806
symbol_exprt symbol_expr (arg0.type ());
1795
1807
const auto &field_name=arg0.get_string (ID_component_name);
1796
1808
symbol_expr.set_identifier (arg0.get_string (ID_class)+" ." +field_name);
1797
- if (needed_classes && arg0.type ().id ()==ID_symbol)
1809
+ if (lazy_methods && arg0.type ().id ()==ID_symbol)
1798
1810
{
1799
- needed_classes-> insert (
1811
+ lazy_methods-> add_needed_class (
1800
1812
to_symbol_type (arg0.type ()).get_identifier ());
1801
1813
}
1802
1814
results[0 ]=java_bytecode_promotion (symbol_expr);
@@ -1816,9 +1828,9 @@ codet java_bytecode_convert_methodt::convert_instructions(
1816
1828
symbol_exprt symbol_expr (arg0.type ());
1817
1829
const auto &field_name=arg0.get_string (ID_component_name);
1818
1830
symbol_expr.set_identifier (arg0.get_string (ID_class)+" ." +field_name);
1819
- if (needed_classes && arg0.type ().id ()==ID_symbol)
1831
+ if (lazy_methods && arg0.type ().id ()==ID_symbol)
1820
1832
{
1821
- needed_classes-> insert (
1833
+ lazy_methods-> add_needed_class (
1822
1834
to_symbol_type (arg0.type ()).get_identifier ());
1823
1835
}
1824
1836
c=code_assignt (symbol_expr, op[0 ]);
@@ -2413,15 +2425,13 @@ void java_bytecode_convert_method(
2413
2425
symbol_tablet &symbol_table,
2414
2426
message_handlert &message_handler,
2415
2427
size_t max_array_length,
2416
- safe_pointer<std::vector<irep_idt> > needed_methods,
2417
- safe_pointer<std::set<irep_idt> > needed_classes)
2428
+ safe_pointer<ci_lazy_methodst> lazy_methods)
2418
2429
{
2419
2430
java_bytecode_convert_methodt java_bytecode_convert_method (
2420
2431
symbol_table,
2421
2432
message_handler,
2422
2433
max_array_length,
2423
- needed_methods,
2424
- needed_classes);
2434
+ lazy_methods);
2425
2435
2426
2436
java_bytecode_convert_method (class_symbol, method);
2427
2437
}
0 commit comments