// ..., value2, value1 => ..., value1, value2, value1
// Duplicate the top value on the operand stack and insert the
// duplicated value two values down in the operand stack.
// The dup_x1 instruction must not be used unless both value1 and value2
// are values of a category 1 computational type
final EnumStackEltType type1 = currentStackElement.getType();
if (type1.getCategory() == 2) {
throw new IllegalArgumentException(
"can not dupX1 type of category 2");
}
final StackElement value2 = pop(currentStackElement);
final EnumStackEltType type2 = value2.getType();
if (type2.getCategory() == 2) {
throw new IllegalArgumentException(
"can not dupX1 type of category 2");
}
StackElement pointer = pop(value2);
pointer = push(pointer, type1);