File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1849,11 +1849,21 @@ codet java_bytecode_convert_methodt::convert_instructions(
1849
1849
lazy_methods->add_needed_class (
1850
1850
to_symbol_type (arg0.type ()).get_identifier ());
1851
1851
}
1852
- results[0 ]=java_bytecode_promotion (symbol_expr);
1853
-
1854
1852
// set $assertionDisabled to false
1855
1853
if (field_name.find (" $assertionsDisabled" )!=std::string::npos)
1854
+ {
1856
1855
c=code_assignt (symbol_expr, false_exprt ());
1856
+ results[0 ]=java_bytecode_promotion (symbol_expr);
1857
+ }
1858
+ else
1859
+ {
1860
+ // create a new stack variable to hold the value of the field
1861
+ const exprt tmp_var=tmp_variable (
1862
+ " stack_static_field" ,
1863
+ java_bytecode_promotion (arg0.type ()));
1864
+ c=code_assignt (tmp_var, symbol_expr);
1865
+ results[0 ]=java_bytecode_promotion (tmp_var);
1866
+ }
1857
1867
}
1858
1868
else if (statement==" putfield" )
1859
1869
{
You can’t perform that action at this time.
0 commit comments