Skip to content

Commit 35213c4

Browse files
committed
Comment that static field symbols should exist
Avoid the suggestion that `get_static_field` might be expected to create them -- it doesn't, java_bytecode_convert_class does and we should be able to safely assume they exist during convert_method.
1 parent a208cce commit 35213c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jbmc/src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,8 @@ code_blockt java_bytecode_convert_methodt::convert_instructions(
15311531

15321532
const irep_idt field_id(
15331533
get_static_field(arg0.get_string(ID_class), field_name));
1534+
1535+
// Symbol should have been populated by java_bytecode_convert_class:
15341536
const symbol_exprt symbol_expr(
15351537
symbol_table.lookup_ref(field_id).symbol_expr());
15361538

@@ -1549,6 +1551,8 @@ code_blockt java_bytecode_convert_methodt::convert_instructions(
15491551

15501552
const irep_idt field_id(
15511553
get_static_field(arg0.get_string(ID_class), field_name));
1554+
1555+
// Symbol should have been populated by java_bytecode_convert_class:
15521556
const symbol_exprt symbol_expr(
15531557
symbol_table.lookup_ref(field_id).symbol_expr());
15541558

0 commit comments

Comments
 (0)