Skip to content

Commit 944a3f3

Browse files
committed
Rename base_name to base_method_name
This is specifically the name of the method only. Not any other part of the expression.
1 parent 2ac75d2 commit 944a3f3

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

jbmc/src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,9 +2272,9 @@ void java_bytecode_convert_methodt::convert_invoke(
22722272
{
22732273
create_method_stub_symbol(
22742274
invoked_method_id,
2275-
class_method_descriptor.get_base_name(),
2275+
class_method_descriptor.base_method_name(),
22762276
id2string(class_method_descriptor.class_id()).substr(6) + "." +
2277-
id2string(class_method_descriptor.get_base_name()) + "()",
2277+
id2string(class_method_descriptor.base_method_name()) + "()",
22782278
method_type,
22792279
class_method_descriptor.class_id(),
22802280
symbol_table,

src/util/std_expr.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4595,17 +4595,20 @@ class class_method_descriptor_exprt : public nullary_exprt
45954595
/// \param class_id: Unique identifier in the symbol table, of the compile
45964596
/// time type of the class which this expression is applied to. For example
45974597
/// this could be - `java::java.lang.Object`.
4598+
/// \param base_method_name: The name of the method to which this expression
4599+
/// is applied as would be seen in the source code. For example this could
4600+
/// be - `toString`.
45984601
explicit class_method_descriptor_exprt(
45994602
typet _type,
46004603
irep_idt component_name,
46014604
irep_idt class_id,
4602-
irep_idt base_name,
4605+
irep_idt base_method_name,
46034606
irep_idt identifier)
46044607
: nullary_exprt(ID_virtual_function, std::move(_type))
46054608
{
46064609
set(ID_component_name, std::move(component_name));
46074610
set(ID_C_class, std::move(class_id));
4608-
set(ID_C_base_name, std::move(base_name));
4611+
set(ID_C_base_name, std::move(base_method_name));
46094612
set(ID_identifier, std::move(identifier));
46104613
}
46114614

@@ -4622,7 +4625,9 @@ class class_method_descriptor_exprt : public nullary_exprt
46224625
return get(ID_C_class);
46234626
}
46244627

4625-
const irep_idt &get_base_name() const
4628+
/// The name of the method to which this expression is applied as would be
4629+
/// seen in the source code. For example this could be - `toString`.
4630+
const irep_idt &base_method_name() const
46264631
{
46274632
return get(ID_C_base_name);
46284633
}

0 commit comments

Comments
 (0)