@@ -21,18 +21,16 @@ Date: June 2003
21
21
22
22
goto_convert_functionst::goto_convert_functionst (
23
23
symbol_tablet &_symbol_table,
24
- goto_functionst &_functions,
25
24
message_handlert &_message_handler):
26
- goto_convertt(_symbol_table, _message_handler),
27
- functions(_functions)
25
+ goto_convertt(_symbol_table, _message_handler)
28
26
{
29
27
}
30
28
31
29
goto_convert_functionst::~goto_convert_functionst ()
32
30
{
33
31
}
34
32
35
- void goto_convert_functionst::goto_convert ()
33
+ void goto_convert_functionst::goto_convert (goto_functionst &functions )
36
34
{
37
35
// warning! hash-table iterators are not stable
38
36
@@ -53,7 +51,7 @@ void goto_convert_functionst::goto_convert()
53
51
54
52
for (const auto &id : symbol_list)
55
53
{
56
- convert_function (id);
54
+ convert_function (id, functions. function_map [id] );
57
55
}
58
56
59
57
functions.compute_location_numbers ();
@@ -135,10 +133,11 @@ void goto_convert_functionst::add_return(
135
133
t->source_location =source_location;
136
134
}
137
135
138
- void goto_convert_functionst::convert_function (const irep_idt &identifier)
136
+ void goto_convert_functionst::convert_function (
137
+ const irep_idt &identifier,
138
+ goto_functionst::goto_functiont &f)
139
139
{
140
140
const symbolt &symbol=ns.lookup (identifier);
141
- goto_functionst::goto_functiont &f=functions.function_map [identifier];
142
141
143
142
if (f.body_available ())
144
143
return ; // already converted
@@ -240,12 +239,11 @@ void goto_convert(
240
239
const unsigned errors_before=
241
240
message_handler.get_message_count (messaget::M_ERROR);
242
241
243
- goto_convert_functionst goto_convert_functions (
244
- symbol_table, functions, message_handler);
242
+ goto_convert_functionst goto_convert_functions (symbol_table, message_handler);
245
243
246
244
try
247
245
{
248
- goto_convert_functions.goto_convert ();
246
+ goto_convert_functions.goto_convert (functions );
249
247
}
250
248
251
249
catch (int )
@@ -276,12 +274,12 @@ void goto_convert(
276
274
const unsigned errors_before=
277
275
message_handler.get_message_count (messaget::M_ERROR);
278
276
279
- goto_convert_functionst goto_convert_functions (
280
- symbol_table, functions, message_handler);
277
+ goto_convert_functionst goto_convert_functions (symbol_table, message_handler);
281
278
282
279
try
283
280
{
284
- goto_convert_functions.convert_function (identifier);
281
+ goto_convert_functions.convert_function (
282
+ identifier, functions.function_map [identifier]);
285
283
}
286
284
287
285
catch (int )
0 commit comments