public void swap ( final Type prev , final Type type ) { if ( type . getSize ( ) == 1 ) { if ( prev . getSize ( ) == 1 ) { swap ( ) ; // same as dupX1(), pop(); } else { dupX2 ( ) ; pop ( ) ; } } else { if ( prev . getSize ( ) == 1 ) { dup2X1 ( ) ; pop2 ( ) ; } else { dup2X2 ( ) ; pop2 ( ) ; } } }
Generates the instructions to swap the top two stack values .