@@ -1933,17 +1933,7 @@ codet java_bytecode_convert_methodt::convert_instructions(
1933
1933
}
1934
1934
else if (statement==" monitorexit" )
1935
1935
{
1936
- // becomes a function call
1937
- code_typet type;
1938
- type.return_type ()=void_typet ();
1939
- type.parameters ().resize (1 );
1940
- type.parameters ()[0 ].type ()=java_reference_type (void_typet ());
1941
- code_function_callt call;
1942
- call.function ()=symbol_exprt (" java::monitorexit" , type);
1943
- call.lhs ().make_nil ();
1944
- call.arguments ().push_back (op[0 ]);
1945
- call.add_source_location ()=i_it->source_location ;
1946
- c=call;
1936
+ c = convert_monitorexit (i_it->source_location , op);
1947
1937
}
1948
1938
else if (statement==" swap" )
1949
1939
{
@@ -2309,6 +2299,22 @@ codet &java_bytecode_convert_methodt::do_exception_handling(
2309
2299
return c;
2310
2300
}
2311
2301
2302
+ codet java_bytecode_convert_methodt::convert_monitorexit (
2303
+ const source_locationt &location,
2304
+ const exprt::operandst &op) const
2305
+ {
2306
+ code_typet type;
2307
+ type.return_type () = void_typet ();
2308
+ type.parameters ().resize (1 );
2309
+ type.parameters ()[0 ].type () = java_reference_type (void_typet ());
2310
+ code_function_callt call;
2311
+ call.function () = symbol_exprt (" java::monitorexit" , type);
2312
+ call.lhs ().make_nil ();
2313
+ call.arguments ().push_back (op[0 ]);
2314
+ call.add_source_location () = location;
2315
+ return call;
2316
+ }
2317
+
2312
2318
codet java_bytecode_convert_methodt::convert_monitorenter (
2313
2319
const source_locationt &location,
2314
2320
const exprt::operandst &op) const
0 commit comments