@@ -1605,16 +1605,7 @@ codet java_bytecode_convert_methodt::convert_instructions(
1605
1605
}
1606
1606
else if (statement==" pop" || statement==" pop2" )
1607
1607
{
1608
- // these are skips
1609
- c=code_skipt ();
1610
-
1611
- // pop2 removes two single-word items from the stack (e.g. two
1612
- // integers, or an integer and an object reference) or one
1613
- // two-word item (i.e. a double or a long).
1614
- // http://cs.au.dk/~mis/dOvs/jvmspec/ref-pop2.html
1615
- if (statement==" pop2" &&
1616
- get_bytecode_type_width (op[0 ].type ())==32 )
1617
- pop (1 );
1608
+ c = convert_pop (statement, op);
1618
1609
}
1619
1610
else if (statement==" instanceof" )
1620
1611
{
@@ -1884,6 +1875,22 @@ codet java_bytecode_convert_methodt::convert_instructions(
1884
1875
return code;
1885
1876
}
1886
1877
1878
+ codet java_bytecode_convert_methodt::convert_pop (
1879
+ const irep_idt &statement,
1880
+ const exprt::operandst &op)
1881
+ {
1882
+ // these are skips
1883
+ codet c = code_skipt ();
1884
+
1885
+ // pop2 removes two single-word items from the stack (e.g. two
1886
+ // integers, or an integer and an object reference) or one
1887
+ // two-word item (i.e. a double or a long).
1888
+ // http://cs.au.dk/~mis/dOvs/jvmspec/ref-pop2.html
1889
+ if (statement == " pop2" && get_bytecode_type_width (op[0 ].type ()) == 32 )
1890
+ pop (1 );
1891
+ return c;
1892
+ }
1893
+
1887
1894
codet java_bytecode_convert_methodt::convert_switch (
1888
1895
java_bytecode_convert_methodt::address_mapt &address_map,
1889
1896
const std::vector<java_bytecode_parse_treet::instructiont>::const_iterator
0 commit comments