@@ -1622,16 +1622,7 @@ codet java_bytecode_convert_methodt::convert_instructions(
16221622 }
16231623 else if (statement==" pop" || statement==" pop2" )
16241624 {
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);
16351626 }
16361627 else if (statement==" instanceof" )
16371628 {
@@ -1901,6 +1892,22 @@ codet java_bytecode_convert_methodt::convert_instructions(
19011892 return code;
19021893}
19031894
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+
19041911codet java_bytecode_convert_methodt::convert_switch (
19051912 java_bytecode_convert_methodt::address_mapt &address_map,
19061913 const exprt::operandst &op,
0 commit comments