Java Code Examples for org.objectweb.asm.Opcodes#DUP2_X2

The following examples show how to use org.objectweb.asm.Opcodes#DUP2_X2 . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TypeUtils.java    From maple-ir with GNU General Public License v3.0 5 votes vote down vote up
public static int getDupXOpcode(Type dType, Type bType) {
	if (dType.getSize() == 1 && bType.getSize() == 1) {
		return Opcodes.DUP_X1;
	} else if (dType.getSize() == 1 && bType.getSize() == 2) {
		return Opcodes.DUP_X2;
	} else if (dType.getSize() == 2 && bType.getSize() == 1) {
		return Opcodes.DUP2_X1;
	} else if (dType.getSize() == 2 && bType.getSize() == 2) {
		return Opcodes.DUP2_X2;
	} else {
		throw new IllegalArgumentException(dType.toString() + " " + bType.toString());
	}
}