34 static irep_idt reference_array_clone_id =
35 "java::array[reference].clone:()Ljava/lang/Object;";
38 const irep_idt ¤t_function = context.back().function_identifier;
40 if(context.size() >= 2 && current_function == reference_array_clone_id)
43 context.at(context.size() - 2).function_identifier;
44 if(
id2string(clone_caller).find(
".values:()[L") != std::string::npos)
50 return current_function;
73 unsigned unwind_count,
80 if(enum_function_id.
empty())
85 INVARIANT(class_id,
"Java methods should have a defining class.");
88 size_t unwinds = class_type.
get_size_t(ID_java_enum_static_unwind);
89 if(unwinds != 0 && unwind_count < unwinds)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
std::size_t get_size_t(const irep_idt &name) const
const symbolt & lookup_ref(const irep_idt &name) const
Find a symbol in the symbol table for read-only access.
typet type
Type of symbol.
The type of an expression, extends irept.
const std::string & id2string(const irep_idt &d)
static irep_idt find_enum_function_on_stack(const call_stackt &context)
Check if we may be in a function that loops over the cases of an enumeration (note we return a candid...
tvt java_enum_static_init_unwind_handler(const call_stackt &context, unsigned loop_number, unsigned unwind_count, unsigned &unwind_max, const symbol_tablet &symbol_table)
Unwind handler that special-cases the clinit (static initializer) functions of enumeration classes,...
Unwind loops in static initializers.
std::optional< irep_idt > declaring_class(const symbolt &symbol)
Gets the identifier of the class which declared a given symbol.
#define PRECONDITION(CONDITION)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
bool has_suffix(const std::string &s, const std::string &suffix)