@@ -1624,16 +1624,7 @@ codet java_bytecode_convert_methodt::convert_instructions(
1624
1624
}
1625
1625
else if (statement==" pop" || statement==" pop2" )
1626
1626
{
1627
- // these are skips
1628
- c=code_skipt ();
1629
-
1630
- // pop2 removes two single-word items from the stack (e.g. two
1631
- // integers, or an integer and an object reference) or one
1632
- // two-word item (i.e. a double or a long).
1633
- // http://cs.au.dk/~mis/dOvs/jvmspec/ref-pop2.html
1634
- if (statement==" pop2" &&
1635
- get_bytecode_type_width (op[0 ].type ())==32 )
1636
- pop (1 );
1627
+ c = convert_pop (statement, op);
1637
1628
}
1638
1629
else if (statement==" instanceof" )
1639
1630
{
@@ -1903,6 +1894,22 @@ codet java_bytecode_convert_methodt::convert_instructions(
1903
1894
return code;
1904
1895
}
1905
1896
1897
+ codet java_bytecode_convert_methodt::convert_pop (
1898
+ const irep_idt &statement,
1899
+ const exprt::operandst &op)
1900
+ {
1901
+ // these are skips
1902
+ codet c = code_skipt ();
1903
+
1904
+ // pop2 removes two single-word items from the stack (e.g. two
1905
+ // integers, or an integer and an object reference) or one
1906
+ // two-word item (i.e. a double or a long).
1907
+ // http://cs.au.dk/~mis/dOvs/jvmspec/ref-pop2.html
1908
+ if (statement == " pop2" && get_bytecode_type_width (op[0 ].type ()) == 32 )
1909
+ pop (1 );
1910
+ return c;
1911
+ }
1912
+
1906
1913
codet java_bytecode_convert_methodt::convert_switch (
1907
1914
java_bytecode_convert_methodt::address_mapt &address_map,
1908
1915
const exprt::operandst &op,
0 commit comments