24 std::string modified_pattern = pattern;
26 modified_pattern += R
"(:\(.*\).*)";
29 modified_pattern =
"java::" + modified_pattern;
31 return std::regex{modified_pattern};
41 const size_t descriptor_index = pattern.rfind(
':');
42 if(descriptor_index == std::string::npos)
45 const std::string java_prefix =
"java::";
46 return descriptor_index == java_prefix.length() - 1 &&
63 std::vector<irep_idt> matched_methods;
64 for(
const auto &symbol : symbol_table.symbols)
67 symbol.second.is_function() &&
68 std::regex_match(
id2string(symbol.first), regex))
70 matched_methods.push_back(symbol.first);
73 return matched_methods;
The symbol table base class interface.
bool has_prefix(const std::string &s, const std::string &prefix)
const std::string & id2string(const irep_idt &d)
bool does_pattern_miss_descriptor(const std::string &pattern)
Identify if a parameter includes a part that will match a descriptor.
static std::regex build_regex_from_pattern(const std::string &pattern)
For a given user provided pattern, return a regex, having dealt with the cases where the user has not...
std::function< std::vector< irep_idt >const symbol_table_baset &symbol_table)> build_load_method_by_regex(const std::string &pattern)
Create a lambda that returns the symbols that the given pattern should be loaded.If the pattern doesn...
Process a pattern to use as a regex for selecting extra entry points for ci_lazy_methodst.