Skip to content

Commit ab19641

Browse files
Add function_id parameter to replace_char_array
This is in preparation for giving the function name to the function generating fresh java symbols.
1 parent 46ecf89 commit ab19641

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

jbmc/src/java_bytecode/java_string_library_preprocess.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,8 @@ exprt::operandst java_string_library_preprocesst::process_operands(
341341
convert_exprt_to_string_exprt(
342342
p, loc, symbol_table, function_id, init_code));
343343
else if(is_java_char_array_pointer_type(p.type()))
344-
ops.push_back(replace_char_array(p, loc, symbol_table, init_code));
344+
ops.push_back(
345+
replace_char_array(p, loc, function_id, symbol_table, init_code));
345346
else
346347
ops.push_back(p);
347348
}
@@ -447,12 +448,14 @@ static exprt get_data(const exprt &expr, const symbol_tablet &symbol_table)
447448
/// array.
448449
/// \param array_pointer: an expression of type char array pointer
449450
/// \param loc: location in the source
451+
/// \param function_id: name of the function in which the string is defined
450452
/// \param symbol_table: symbol table
451453
/// \param code: code block, in which some assignments will be added
452454
/// \return a string expression
453455
refined_string_exprt java_string_library_preprocesst::replace_char_array(
454456
const exprt &array_pointer,
455457
const source_locationt &loc,
458+
const irep_idt &function_id,
456459
symbol_table_baset &symbol_table,
457460
code_blockt &code)
458461
{

jbmc/src/java_bytecode/java_string_library_preprocess.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ class java_string_library_preprocesst:public messaget
220220
refined_string_exprt replace_char_array(
221221
const exprt &array_pointer,
222222
const source_locationt &loc,
223+
const irep_idt &function_name,
223224
symbol_table_baset &symbol_table,
224225
code_blockt &code);
225226

0 commit comments

Comments
 (0)