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