@@ -120,18 +120,15 @@ static symbolt add_new_variable_symbol(
120120 const bool is_thread_local,
121121 const bool is_static_lifetime)
122122{
123- symbolt new_symbol;
124- new_symbol.name = name;
123+ symbolt new_symbol{name, type, ID_java};
125124 new_symbol.pretty_name = name;
126125 new_symbol.base_name = name;
127- new_symbol.type = type;
128126 new_symbol.type .set (ID_C_no_nondet_initialization, true );
129127 new_symbol.value = value;
130128 new_symbol.is_lvalue = true ;
131129 new_symbol.is_state_var = true ;
132130 new_symbol.is_static_lifetime = is_static_lifetime;
133131 new_symbol.is_thread_local = is_thread_local;
134- new_symbol.mode = ID_java;
135132 symbol_table.add (new_symbol);
136133 return new_symbol;
137134}
@@ -336,16 +333,14 @@ static void create_function_symbol(
336333 symbol_table_baset &symbol_table,
337334 synthetic_methods_mapt &synthetic_methods)
338335{
339- symbolt function_symbol;
340- const java_method_typet function_type ({}, java_void_type ());
336+ symbolt function_symbol{
337+ function_name, java_method_typet ({}, java_void_type ()), ID_java} ;
341338 function_symbol.name = function_name;
342339 function_symbol.pretty_name = function_symbol.name ;
343340 function_symbol.base_name = function_base_name;
344- function_symbol.type = function_type;
345341 // This provides a back-link from a method to its associated class, as is done
346342 // for java_bytecode_convert_methodt::convert.
347343 set_declaring_class (function_symbol, class_name);
348- function_symbol.mode = ID_java;
349344 bool failed = symbol_table.add (function_symbol);
350345 INVARIANT (!failed, id2string (function_base_name) + " symbol should be fresh" );
351346
@@ -969,14 +964,10 @@ void stub_global_initializer_factoryt::create_stub_global_initializer_symbols(
969964 " a class cannot be both incomplete, and so have stub static fields, and "
970965 " also define a static initializer" );
971966
972- const java_method_typet thunk_type ({}, java_void_type ());
973-
974- symbolt static_init_symbol;
975- static_init_symbol.name = static_init_name;
967+ symbolt static_init_symbol{
968+ static_init_name, java_method_typet ({}, java_void_type ()), ID_java};
976969 static_init_symbol.pretty_name = static_init_name;
977970 static_init_symbol.base_name = " clinit():V" ;
978- static_init_symbol.mode = ID_java;
979- static_init_symbol.type = thunk_type;
980971 // This provides a back-link from a method to its associated class, as is
981972 // done for java_bytecode_convert_methodt::convert.
982973 set_declaring_class (static_init_symbol, it->first );
0 commit comments