code: private void toBoolean(boolean box) {
          if (box && mTarget >= 0x00010004) {
              // Call the new valueOf method.
              invokeStatic("java.lang.Boolean", "valueOf",
                           TypeDesc.BOOLEAN.toObjectType(),
                           new TypeDesc[] {TypeDesc.BOOLEAN});
              return;
          }
  
          Label nonZero = createLabel();
          Label done = createLabel();
          ifZeroComparisonBranch(nonZero, "!=");
          if (box) {
              TypeDesc newType = TypeDesc.BOOLEAN.toObjectType();
              loadStaticField(newType.getRootName(), "FALSE", newType);
              branch(done);
              nonZero.setLocation();
              loadStaticField(newType.getRootName(), "TRUE", newType);
          } else {
              loadConstant(false);
              branch(done);
              nonZero.setLocation();
              loadConstant(true);
          }
          done.setLocation();
      }
docs: Converts an int on the stack to a boolean.