// type (§3.11.1).
//
// Duplicate the top one or two values on the operand stack and insert
// the duplicated values, in the original order, into the operand stack.
final EnumStackEltType type1 = currentStackElement.getType();
final StackElement value2 = pop(currentStackElement);
final StackElement value3 = pop(value2);
final StackElement value4 = pop(value3);
StackElement pointer = pop(value4);
pointer = push(pointer, value2.getType());
if (value2.isThisReference()) {
pointer.setIsThisRef();
}
pointer = push(pointer, type1);
if (currentStackElement.isThisReference()) {
pointer.setIsThisRef();
}
pointer = push(pointer, value4.getType());
if (value4.isThisReference()) {
pointer.setIsThisRef();
}
pointer = push(pointer, value3.getType());
if (value3.isThisReference()) {
pointer.setIsThisRef();
}
pointer = push(pointer, value2.getType());
if (value2.isThisReference()) {
pointer.setIsThisRef();
}
pointer = push(pointer, type1);
if (currentStackElement.isThisReference()) {
pointer.setIsThisRef();
}
return pointer;
}