Skip to content

Commit e0c56ae

Browse files
Creates field for containing_class
This is intended for when the class is an inner class. It gives the name of its containing class so that properties of the containing class can be propagated to the inner class as required.
1 parent 7c4b5aa commit e0c56ae

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

jbmc/src/java_bytecode/java_bytecode_parse_tree.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ class java_bytecode_parse_treet
221221
bool is_static_class = false;
222222
bool is_anonymous_class = false;
223223
bool attribute_bootstrapmethods_read = false;
224+
irep_idt containing_class;
224225
size_t enum_elements=0;
225226

226227
enum class method_handle_typet

jbmc/src/java_bytecode/java_types.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ class java_class_typet:public class_typet
121121
return set(ID_is_inner_class, is_inner_class);
122122
}
123123

124+
const irep_idt get_containing_class() const
125+
{
126+
return get(ID_containing_class);
127+
}
128+
129+
void set_containing_class(irep_idt containing_class)
130+
{
131+
return set(ID_containing_class, containing_class);
132+
}
133+
124134
const bool get_is_static_class() const
125135
{
126136
return get_bool(ID_is_static);

src/util/irep_ids.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ IREP_ID_ONE(interface)
675675
IREP_ID_TWO(C_must_not_throw, #must_not_throw)
676676
IREP_ID_ONE(is_inner_class)
677677
IREP_ID_ONE(is_anonymous)
678+
IREP_ID_ONE(containing_class)
678679

679680
// Projects depending on this code base that wish to extend the list of
680681
// available ids should provide a file local_irep_ids.h in their source tree and

0 commit comments

Comments
 (0)