@@ -1512,22 +1512,7 @@ codet java_bytecode_convert_methodt::convert_instructions(
1512
1512
else if (statement==" dup2_x2" )
1513
1513
{
1514
1514
PRECONDITION (!stack.empty () && results.empty ());
1515
-
1516
- if (get_bytecode_type_width (stack.back ().type ())==32 )
1517
- op=pop (2 );
1518
- else
1519
- op=pop (1 );
1520
-
1521
- exprt::operandst op2;
1522
-
1523
- if (get_bytecode_type_width (stack.back ().type ())==32 )
1524
- op2=pop (2 );
1525
- else
1526
- op2=pop (1 );
1527
-
1528
- results.insert (results.end (), op.begin (), op.end ());
1529
- results.insert (results.end (), op2.begin (), op2.end ());
1530
- results.insert (results.end (), op.begin (), op.end ());
1515
+ convert_dup2_x2 (op, results);
1531
1516
}
1532
1517
else if (statement==" dconst" )
1533
1518
{
@@ -1983,6 +1968,27 @@ void java_bytecode_convert_methodt::convert_dup2_x1(
1983
1968
results.insert (results.end (), op.begin (), op.end ());
1984
1969
}
1985
1970
1971
+ void java_bytecode_convert_methodt::convert_dup2_x2 (
1972
+ exprt::operandst &op,
1973
+ exprt::operandst &results)
1974
+ {
1975
+ if (get_bytecode_type_width (stack.back ().type ()) == 32 )
1976
+ op = pop (2 );
1977
+ else
1978
+ op = pop (1 );
1979
+
1980
+ exprt::operandst op2;
1981
+
1982
+ if (get_bytecode_type_width (stack.back ().type ()) == 32 )
1983
+ op2 = pop (2 );
1984
+ else
1985
+ op2 = pop (1 );
1986
+
1987
+ results.insert (results.end (), op.begin (), op.end ());
1988
+ results.insert (results.end (), op2.begin (), op2.end ());
1989
+ results.insert (results.end (), op.begin (), op.end ());
1990
+ }
1991
+
1986
1992
exprt::operandst &java_bytecode_convert_methodt::convert_const (
1987
1993
const irep_idt &statement,
1988
1994
const exprt &arg0,
0 commit comments