@@ -169,33 +169,26 @@ static void java_static_lifetime_init(
169
169
// Argument order is: name, isAnnotation, isArray, isInterface,
170
170
// isSynthetic, isLocalClass, isMemberClass, isEnum
171
171
172
- code_function_callt initializer_call;
173
- initializer_call.function () = class_literal_init_method->symbol_expr ();
174
-
175
- code_function_callt::argumentst &args = initializer_call.arguments ();
176
-
177
- // this:
178
- args.push_back (address_of_exprt (sym.symbol_expr ()));
179
- // name:
180
- args.push_back (address_of_exprt (class_name_literal));
181
- // isAnnotation:
182
- args.push_back (
183
- constant_bool (class_symbol.type .get_bool (ID_is_annotation)));
184
- // isArray:
185
- args.push_back (constant_bool (class_is_array));
186
- // isInterface:
187
- args.push_back (
188
- constant_bool (class_symbol.type .get_bool (ID_interface)));
189
- // isSynthetic:
190
- args.push_back (
191
- constant_bool (class_symbol.type .get_bool (ID_synthetic)));
192
- // isLocalClass:
193
- args.push_back (nondet_bool);
194
- // isMemberClass:
195
- args.push_back (nondet_bool);
196
- // isEnum:
197
- args.push_back (
198
- constant_bool (class_symbol.type .get_bool (ID_enumeration)));
172
+ code_function_callt initializer_call (
173
+ class_literal_init_method->symbol_expr (),
174
+ {// this:
175
+ address_of_exprt (sym.symbol_expr ()),
176
+ // name:
177
+ address_of_exprt (class_name_literal),
178
+ // isAnnotation:
179
+ constant_bool (class_symbol.type .get_bool (ID_is_annotation)),
180
+ // isArray:
181
+ constant_bool (class_is_array),
182
+ // isInterface:
183
+ constant_bool (class_symbol.type .get_bool (ID_interface)),
184
+ // isSynthetic:
185
+ constant_bool (class_symbol.type .get_bool (ID_synthetic)),
186
+ // isLocalClass:
187
+ nondet_bool,
188
+ // isMemberClass:
189
+ nondet_bool,
190
+ // isEnum:
191
+ constant_bool (class_symbol.type .get_bool (ID_enumeration))});
199
192
200
193
// First initialize the object as prior to a constructor:
201
194
namespacet ns (symbol_table);
@@ -676,10 +669,8 @@ bool generate_java_start_function(
676
669
return true ; // give up with error
677
670
}
678
671
679
- code_function_callt call_init;
680
- call_init.lhs ().make_nil ();
672
+ code_function_callt call_init (init_it->second .symbol_expr ());
681
673
call_init.add_source_location ()=symbol.location ;
682
- call_init.function ()=init_it->second .symbol_expr ();
683
674
684
675
init_code.move_to_operands (call_init);
685
676
}
@@ -689,15 +680,13 @@ bool generate_java_start_function(
689
680
// where return is a new variable
690
681
// and arg1 ... argn are constructed below as well
691
682
692
- code_function_callt call_main;
693
-
694
683
source_locationt loc=symbol.location ;
695
684
loc.set_function (symbol.name );
696
685
source_locationt &dloc=loc;
697
686
698
687
// function to call
688
+ code_function_callt call_main (symbol.symbol_expr ());
699
689
call_main.add_source_location ()=dloc;
700
- call_main.function ()=symbol.symbol_expr ();
701
690
call_main.function ().add_source_location ()=dloc;
702
691
703
692
// if the method return type is not void, store return value in a new variable
0 commit comments