Skip to content

Commit d29be11

Browse files
committed
Java string preprocessing: Remove or document unused parameter function_id
1 parent d6bdee6 commit d29be11

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

jbmc/src/java_bytecode/java_object_factory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ codet initialize_nondet_string_struct(
629629
// data_expr = nondet(char[INFINITY]) // we use infinity for variable size
630630
const dereference_exprt data_expr(data_pointer);
631631
const exprt nondet_array =
632-
make_nondet_infinite_char_array(symbol_table, loc, function_id, code);
632+
make_nondet_infinite_char_array(symbol_table, loc, code);
633633
code.add(code_assignt(data_expr, nondet_array));
634634

635635
struct_expr.copy_to_operands(length_expr);

jbmc/src/java_bytecode/java_string_library_preprocess.cpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ refined_string_exprt java_string_library_preprocesst::make_nondet_string_expr(
550550
code.add(code_assignt(str.length(), nondet_length), loc);
551551

552552
exprt nondet_array_expr =
553-
make_nondet_infinite_char_array(symbol_table, loc, function_id, code);
553+
make_nondet_infinite_char_array(symbol_table, loc, code);
554554

555555
address_of_exprt array_pointer(
556556
index_exprt(nondet_array_expr, from_integer(0, java_int_type())));
@@ -652,7 +652,6 @@ codet java_string_library_preprocesst::code_return_function_application(
652652
exprt make_nondet_infinite_char_array(
653653
symbol_table_baset &symbol_table,
654654
const source_locationt &loc,
655-
const irep_idt &function_id,
656655
code_blockt &code)
657656
{
658657
const array_typet array_type(
@@ -940,6 +939,7 @@ java_string_library_preprocesst::string_literal_to_string_expr(
940939
/// \param type: type of the function call
941940
/// \param loc: location in the program_invocation_name
942941
/// \param symbol_table: symbol table
942+
/// \param function_id: unused
943943
/// \return Code corresponding to:
944944
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
945945
/// IF arg->@class_identifier == "java.lang.String"
@@ -957,6 +957,8 @@ codet java_string_library_preprocesst::make_equals_function_code(
957957
const irep_idt &function_id,
958958
symbol_table_baset &symbol_table)
959959
{
960+
(void)function_id;
961+
960962
const typet &return_type = type.return_type();
961963
exprt::operandst ops;
962964
for(const auto &p : type.parameters())
@@ -1735,6 +1737,7 @@ codet java_string_library_preprocesst::make_copy_string_code(
17351737
/// object.
17361738
/// \param type: type of the function
17371739
/// \param loc: location in the source
1740+
/// \param function_id: unused
17381741
/// \param symbol_table: symbol table
17391742
/// \return Code corresponding to:
17401743
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1748,6 +1751,8 @@ codet java_string_library_preprocesst::make_copy_constructor_code(
17481751
const irep_idt &function_id,
17491752
symbol_table_baset &symbol_table)
17501753
{
1754+
(void)function_id;
1755+
17511756
// Code for the output
17521757
code_blockt code;
17531758

@@ -1774,6 +1779,7 @@ codet java_string_library_preprocesst::make_copy_constructor_code(
17741779
/// count instead of end index
17751780
/// \param type: type of the function call
17761781
/// \param loc: location in the program_invocation_name
1782+
/// \param function_id: unused
17771783
/// \param symbol_table: symbol table
17781784
/// \return code implementing String intitialization from a char array and
17791785
/// arguments offset and end.
@@ -1783,6 +1789,8 @@ codet java_string_library_preprocesst::make_init_from_array_code(
17831789
const irep_idt &function_id,
17841790
symbol_table_baset &symbol_table)
17851791
{
1792+
(void)function_id;
1793+
17861794
// Code for the output
17871795
code_blockt code;
17881796

@@ -1818,6 +1826,7 @@ codet java_string_library_preprocesst::make_init_from_array_code(
18181826
/// Generates code for the String.length method
18191827
/// \param type: type of the function
18201828
/// \param loc: location in the source
1829+
/// \param function_id: unused
18211830
/// \param symbol_table: symbol table
18221831
/// \return Code corresponding to:
18231832
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1831,6 +1840,9 @@ codet java_string_library_preprocesst::make_string_length_code(
18311840
const irep_idt &function_id,
18321841
symbol_table_baset &symbol_table)
18331842
{
1843+
(void)loc;
1844+
(void)function_id;
1845+
18341846
code_typet::parameterst params=type.parameters();
18351847
symbol_exprt arg_this(params[0].get_identifier(), params[0].type());
18361848
dereference_exprt deref=

jbmc/src/java_bytecode/java_string_library_preprocess.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ class java_string_library_preprocesst:public messaget
363363
exprt make_nondet_infinite_char_array(
364364
symbol_table_baset &symbol_table,
365365
const source_locationt &loc,
366-
const irep_idt &function_id,
367366
code_blockt &code);
368367

369368
void add_pointer_to_array_association(

0 commit comments

Comments
 (0)