Skip to content

Commit f6586ed

Browse files
author
Matthias Güdemann
committed
Rename functions to get_recursively_instantiated_type
1 parent b0fde14 commit f6586ed

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

jbmc/src/java_bytecode/select_pointer_type.cpp

+10-8
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pointer_typet select_pointer_typet::specialize_generics(
8787
// avoid infinite recursion
8888
if(visited_nodes.find(parameter_name) != visited_nodes.end())
8989
{
90-
optionalt<pointer_typet> result = get_instantiated_type(
90+
optionalt<pointer_typet> result = get_recursively_instantiated_type(
9191
parameter_name, generic_parameter_specialization_map);
9292
if(result.has_value())
9393
{
@@ -144,7 +144,8 @@ pointer_typet select_pointer_typet::specialize_generics(
144144
/// \param generic_specialization_map Map of type names to specialization stack
145145
/// \return The first instantiated type for the generic type or nothing if no
146146
/// such instantiation exists.
147-
optionalt<pointer_typet> select_pointer_typet::get_instantiated_type(
147+
optionalt<pointer_typet>
148+
select_pointer_typet::get_recursively_instantiated_type(
148149
const irep_idt &parameter_name,
149150
const generic_parameter_specialization_mapt
150151
&generic_parameter_specialization_map) const
@@ -157,7 +158,7 @@ optionalt<pointer_typet> select_pointer_typet::get_instantiated_type(
157158
irep_idt current_parameter = parameter_name;
158159
while(depth < max)
159160
{
160-
const auto retval = get_instantiated_type(
161+
const auto retval = get_recursively_instantiated_type(
161162
current_parameter, generic_parameter_specialization_map, visited, depth);
162163
if(retval.has_value())
163164
{
@@ -177,12 +178,13 @@ optionalt<pointer_typet> select_pointer_typet::get_instantiated_type(
177178
return {};
178179
}
179180

180-
/// See get_instantiated_type, the additional parameters just track the
181-
/// recursion to prevent, visiting the same depth again and specify which stack
182-
/// depth is analyzed.
181+
/// See get_recursively instantiated_type, the additional parameters just track
182+
/// the recursion to prevent, visiting the same depth again and specify which
183+
/// stack depth is analyzed.
183184
/// \param visited Tracks the visited parameter names
184185
/// \param depth Stack depth to analyze
185-
optionalt<pointer_typet> select_pointer_typet::get_instantiated_type(
186+
optionalt<pointer_typet>
187+
select_pointer_typet::get_recursively_instantiated_type(
186188
const irep_idt &parameter_name,
187189
const generic_parameter_specialization_mapt
188190
&generic_parameter_specialization_map,
@@ -220,7 +222,7 @@ optionalt<pointer_typet> select_pointer_typet::get_instantiated_type(
220222

221223
visited.insert(parameter_name);
222224
const auto &gen_type = to_java_generic_parameter(type).type_variable();
223-
const auto inst_val = get_instantiated_type(
225+
const auto inst_val = get_recursively_instantiated_type(
224226
gen_type.get_identifier(),
225227
generic_parameter_specialization_map,
226228
visited,

jbmc/src/java_bytecode/select_pointer_type.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ class namespacet;
2525

2626
class select_pointer_typet
2727
{
28-
optionalt<pointer_typet> get_instantiated_type(
28+
optionalt<pointer_typet> get_recursively_instantiated_type(
2929
const irep_idt &,
3030
const generic_parameter_specialization_mapt &,
3131
generic_parameter_recursion_trackingt &,
3232
const size_t) const;
33-
optionalt<pointer_typet> get_instantiated_type(
33+
optionalt<pointer_typet> get_recursively_instantiated_type(
3434
const irep_idt &parameter_name,
3535
const generic_parameter_specialization_mapt &) const;
3636

0 commit comments

Comments
 (0)