Skip to content

Commit 2d954a2

Browse files
author
Daniel Kroening
committed
java: function in location is now pretty name
1 parent 68a0b70 commit 2d954a2

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

jbmc/src/java_bytecode/java_bytecode_convert_class.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ void java_bytecode_convert_classt::add_array_types(symbol_tablet &symbol_table)
856856
code_declt declare_cloned(local_symexpr);
857857

858858
source_locationt location;
859-
location.set_function(local_name);
859+
location.set_function(local_symbol.pretty_name);
860860
side_effect_exprt java_new_array(
861861
ID_java_new_array, java_reference_type(symbol_type), location);
862862
dereference_exprt old_array(this_symbol.symbol_expr(), symbol_type);

jbmc/src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,6 @@ void java_bytecode_convert_method_lazy(
356356
method_symbol.name=method_identifier;
357357
method_symbol.base_name=m.base_name;
358358
method_symbol.mode=ID_java;
359-
method_symbol.location=m.source_location;
360-
method_symbol.location.set_function(method_identifier);
361359

362360
if(m.is_public)
363361
member_type.set_access(ID_public);
@@ -408,6 +406,9 @@ void java_bytecode_convert_method_lazy(
408406
id2string(m.base_name) + signature_string;
409407
}
410408

409+
method_symbol.location=m.source_location;
410+
method_symbol.location.set_function(method_symbol.pretty_name);
411+
411412
// Load annotations
412413
if(!m.annotations.empty())
413414
{
@@ -589,7 +590,6 @@ void java_bytecode_convert_methodt::convert(
589590
// Update the symbol for the method
590591
method_symbol.mode=ID_java;
591592
method_symbol.location=m.source_location;
592-
method_symbol.location.set_function(method_identifier);
593593

594594
for(const auto &exception_name : m.throws_exception_table)
595595
method_type.add_throws_exceptions(exception_name);
@@ -617,6 +617,7 @@ void java_bytecode_convert_methodt::convert(
617617
id2string(m.base_name) + signature_string;
618618
}
619619

620+
method_symbol.location.set_function(method_symbol.pretty_name);
620621
method_symbol.type = method_type;
621622
current_method = method_symbol.name;
622623
method_has_this = method_type.has_this();

jbmc/src/java_bytecode/simple_method_stubbing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void java_simple_method_stubst::create_method_stub(symbolt &symbol)
149149

150150
// synthetic source location that contains the opaque function name only
151151
source_locationt synthesized_source_location;
152-
synthesized_source_location.set_function(symbol.name);
152+
synthesized_source_location.set_function(symbol.pretty_name);
153153

154154
// Initialize the return value or `this` parameter under construction.
155155
// Note symbol.type is required_type, but with write access

0 commit comments

Comments
 (0)