File tree Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -718,15 +718,13 @@ void compilet::convert_symbols(goto_functionst &dest)
718
718
symbol_table.symbols .find (*it);
719
719
assert (s_it!=symbol_table.symbols .end ());
720
720
721
- if (s_it->second .type .id ()==ID_code &&
722
- !s_it->second .is_macro &&
723
- !s_it->second .is_type &&
724
- s_it->second .value .id ()!=" compiled" &&
725
- s_it->second .value .is_not_nil ())
721
+ if (
722
+ s_it->second .is_function () && !s_it->second .is_compiled () &&
723
+ s_it->second .value .is_not_nil ())
726
724
{
727
725
debug () << " Compiling " << s_it->first << eom;
728
726
converter.convert_function (s_it->first , dest.function_map [s_it->first ]);
729
- symbol_table.get_writeable_ref (*it).value = exprt ( " compiled " );
727
+ symbol_table.get_writeable_ref (*it).mark_compiled ( );
730
728
}
731
729
}
732
730
}
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ void goto_convert_functionst::convert_function(
152
152
f.type =to_code_type (symbol.type );
153
153
154
154
if (symbol.value .is_nil () ||
155
- symbol.value . id ()== " compiled " ) /* goto_inline may have removed the body */
155
+ symbol.is_compiled () ) /* goto_inline may have removed the body */
156
156
return ;
157
157
158
158
if (symbol.value .id ()!=ID_code)
Original file line number Diff line number Diff line change @@ -697,6 +697,7 @@ IREP_ID_ONE(r_ok)
697
697
IREP_ID_ONE(w_ok)
698
698
IREP_ID_ONE(super_class)
699
699
IREP_ID_ONE(exceptions_thrown_list)
700
+ IREP_ID_ONE(compiled)
700
701
701
702
// Projects depending on this code base that wish to extend the list of
702
703
// available ids should provide a file local_irep_ids.def in their source tree
Original file line number Diff line number Diff line change @@ -107,6 +107,16 @@ class symbolt
107
107
{
108
108
return !is_type && !is_macro && type.id ()==ID_code;
109
109
}
110
+
111
+ bool is_compiled () const
112
+ {
113
+ return value == exprt (ID_compiled);
114
+ }
115
+
116
+ void mark_compiled ()
117
+ {
118
+ value = exprt (ID_compiled);
119
+ }
110
120
};
111
121
112
122
std::ostream &operator <<(std::ostream &out, const symbolt &symbol);
You can’t perform that action at this time.
0 commit comments