code: Type fold1(int opcode, Type operand) {
          try {
              Object od = operand.constValue();
              switch (opcode) {
              case nop:
                  return operand;
              case ineg: // unary -
                  return syms.intType.constType(-intValue(od));
              case ixor: // ~
                  return syms.intType.constType(~intValue(od));
              case bool_not: // !
                  return syms.booleanType.constType(b2i(intValue(od) == 0));
              case ifeq:
                  return syms.booleanType.constType(b2i(intValue(od) == 0));
              case ifne:
                  return syms.booleanType.constType(b2i(intValue(od) != 0));
              case iflt:
                  return syms.booleanType.constType(b2i(intValue(od) < 0));
              case ifgt:
                  return syms.booleanType.constType(b2i(intValue(od) > 0));
              case ifle:
                  return syms.booleanType.constType(b2i(intValue(od) <= 0));
              case ifge:
                  return syms.booleanType.constType(b2i(intValue(od) >= 0));
  
              case lneg: // unary -
                  return syms.longType.constType(new Long(-longValue(od)));
              case lxor: // ~
                  return syms.longType.constType(new Long(~longValue(od)));
  
              case fneg: // unary -
                  return syms.floatType.constType(new Float(-floatValue(od)));
  
              case dneg: // ~
                  return syms.doubleType.constType(new Double(-doubleValue(od)));
  
              default:
                  return null;
              }
          } catch (ArithmeticException e) {
              return null;
          }
      }
docs: Fold unary operation.
  @param opcode    The operation's opcode instruction (usually a byte code),
  as entered by class Symtab.
  opcode's ifeq to ifge are for postprocessing
  xcmp; ifxx pairs of instructions.
  @param operand   The operation's operand type.
  Argument types are assumed to have non-null constValue's.