Skip to content

Commit 8212285

Browse files
committed
Java front-end: remove unused parameters
1 parent 2111f7c commit 8212285

9 files changed

+4
-26
lines changed

jbmc/src/java_bytecode/ci_lazy_methods_needed.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void ci_lazy_methods_neededt::add_all_needed_classes(
5858
// TODO we should be passing here a map that maps generic parameters
5959
// to concrete types in the current context TG-2664
6060
const pointer_typet &subbed_pointer_type =
61-
pointer_type_selector.convert_pointer_type(pointer_type, {}, ns);
61+
pointer_type_selector.convert_pointer_type(pointer_type, {});
6262

6363
if(subbed_pointer_type != pointer_type)
6464
{

jbmc/src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,6 @@ void java_bytecode_convert_methodt::convert(
613613
if((!m.is_abstract) && (!m.is_native))
614614
method_symbol.value = convert_instructions(
615615
m,
616-
code_type,
617-
method_symbol.name,
618616
to_java_class_type(class_symbol.type).lambda_method_handles());
619617
}
620618

@@ -983,8 +981,6 @@ static std::size_t get_bytecode_type_width(const typet &ty)
983981

984982
codet java_bytecode_convert_methodt::convert_instructions(
985983
const methodt &method,
986-
const code_typet &method_type,
987-
const irep_idt &method_name,
988984
const java_class_typet::java_lambda_method_handlest &lambda_method_handles)
989985
{
990986
const instructionst &instructions=method.instructions;
@@ -3136,7 +3132,6 @@ bool java_bytecode_convert_methodt::is_method_inherited(
31363132
get_inherited_component(
31373133
classname,
31383134
methodid,
3139-
classname,
31403135
symbol_table,
31413136
class_hierarchy,
31423137
false);
@@ -3156,7 +3151,6 @@ irep_idt java_bytecode_convert_methodt::get_static_field(
31563151
get_inherited_component(
31573152
class_identifier,
31583153
component_name,
3159-
symbol_table.lookup_ref(current_method).type.get(ID_C_class),
31603154
symbol_table,
31613155
class_hierarchy,
31623156
true);

jbmc/src/java_bytecode/java_bytecode_convert_method_class.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,6 @@ class java_bytecode_convert_methodt:public messaget
265265

266266
codet convert_instructions(
267267
const methodt &,
268-
const code_typet &,
269-
const irep_idt &,
270268
const java_class_typet::java_lambda_method_handlest &);
271269

272270
const bytecode_infot &get_bytecode_info(const irep_idt &statement);

jbmc/src/java_bytecode/java_bytecode_language.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,6 @@ static void create_stub_global_symbols(
527527
get_inherited_component(
528528
class_id,
529529
component,
530-
"java::" + id2string(parse_tree.parsed_class.name),
531530
symbol_table,
532531
class_hierarchy,
533532
true);

jbmc/src/java_bytecode/java_object_factory.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ class java_object_factoryt
120120
void gen_nondet_pointer_init(
121121
code_blockt &assignments,
122122
const exprt &expr,
123-
const irep_idt &class_identifier,
124123
allocation_typet alloc_type,
125124
const pointer_typet &pointer_type,
126125
size_t depth,
@@ -709,9 +708,6 @@ static bool add_nondet_string_pointer_initialization(
709708
/// The code block we are building with initialization code.
710709
/// \param expr:
711710
/// Pointer-typed lvalue expression to initialize.
712-
/// \param class_identifier:
713-
/// Name of the parent class. Used to initialize the `@class_identifier` among
714-
/// others.
715711
/// \param alloc_type:
716712
/// Allocation type (global, local or dynamic)
717713
/// \param depth:
@@ -727,7 +723,6 @@ static bool add_nondet_string_pointer_initialization(
727723
void java_object_factoryt::gen_nondet_pointer_init(
728724
code_blockt &assignments,
729725
const exprt &expr,
730-
const irep_idt &class_identifier,
731726
allocation_typet alloc_type,
732727
const pointer_typet &pointer_type,
733728
size_t depth,
@@ -736,7 +731,7 @@ void java_object_factoryt::gen_nondet_pointer_init(
736731
PRECONDITION(expr.type().id()==ID_pointer);
737732
const pointer_typet &replacement_pointer_type =
738733
pointer_type_selector.convert_pointer_type(
739-
pointer_type, generic_parameter_specialization_map, ns);
734+
pointer_type, generic_parameter_specialization_map);
740735

741736
// If we are changing the pointer, we generate code for creating a pointer
742737
// to the substituted type instead
@@ -1189,7 +1184,6 @@ void java_object_factoryt::gen_nondet_init(
11891184
gen_nondet_pointer_init(
11901185
assignments,
11911186
expr,
1192-
class_identifier,
11931187
alloc_type,
11941188
pointer_type,
11951189
depth,

jbmc/src/java_bytecode/java_utils.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,6 @@ std::string pretty_print_java_type(const std::string &fqn_java_type)
331331
/// trying to resolve a reference to A.b, component_class_id is "A".
332332
/// \param component_name: component basename to search for. If searching for
333333
/// A.b, this is "b".
334-
/// \param user_class_id: class identifier making reference to the sought
335-
/// component. The user class is relevant when determining whether package-
336-
/// scoped components are visible from a particular use site.
337334
/// \param symbol_table: global symbol table.
338335
/// \param class_hierarchy: global class hierarchy.
339336
/// \param include_interfaces: if true, search for the given component in all
@@ -343,7 +340,6 @@ std::string pretty_print_java_type(const std::string &fqn_java_type)
343340
resolve_inherited_componentt::inherited_componentt get_inherited_component(
344341
const irep_idt &component_class_id,
345342
const irep_idt &component_name,
346-
const irep_idt &user_class_id,
347343
const symbol_tablet &symbol_table,
348344
const class_hierarchyt &class_hierarchy,
349345
bool include_interfaces)

jbmc/src/java_bytecode/java_utils.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ std::string pretty_print_java_type(const std::string &fqn_java_type);
103103
resolve_inherited_componentt::inherited_componentt get_inherited_component(
104104
const irep_idt &component_class_id,
105105
const irep_idt &component_name,
106-
const irep_idt &user_class_id,
107106
const symbol_tablet &symbol_table,
108107
const class_hierarchyt &class_hierarchy,
109108
bool include_interfaces);

jbmc/src/java_bytecode/select_pointer_type.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
pointer_typet select_pointer_typet::convert_pointer_type(
2626
const pointer_typet &pointer_type,
2727
const generic_parameter_specialization_mapt
28-
&generic_parameter_specialization_map,
29-
const namespacet &ns) const
28+
&generic_parameter_specialization_map) const
3029
{
3130
// if we have a map of generic parameters -> types and the pointer is
3231
// a generic parameter, specialize it with concrete types

jbmc/src/java_bytecode/select_pointer_type.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ class select_pointer_typet
3939
virtual pointer_typet convert_pointer_type(
4040
const pointer_typet &pointer_type,
4141
const generic_parameter_specialization_mapt
42-
&generic_parameter_specialization_map,
43-
const namespacet &ns) const;
42+
&generic_parameter_specialization_map) const;
4443

4544
pointer_typet specialize_generics(
4645
const pointer_typet &pointer_type,

0 commit comments

Comments
 (0)