public static StorageSlot defineStorageSlotFromParseTree(Cons slotdef, Surrogate owner) {
    { Stella_Object name = slotdef.value.permanentify();
      Surrogate basetype = null;
      Cons typeexpression = Stella.NIL;
      PropertyList theoptions = PropertyList.newPropertyList();
      KeywordKeyValueList slotoptions = KeywordKeyValueList.newKeywordKeyValueList();
      Keyword key = null;
      StorageSlot slot = null;

      theoptions.thePlist = slotdef.rest;
      { Stella_Object thekey = null;
        Stella_Object thevalue = null;
        Cons iter000 = theoptions.thePlist;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest.rest) {
          thekey = iter000.value;
          thevalue = iter000.rest.value;
          key = ((Keyword)(thekey.permanentify()));
          if ((key == Stella.KWD_INITIALLY) ||
              (key == Stella.KWD_DEFAULT)) {
            slotoptions.insertAt(key, Stella_Object.permanentifyForm(thevalue));
          }
          else if (key == Stella.KWD_TYPE) {
            if (Stella_Object.safePrimaryType(thevalue) == Stella.SGT_STELLA_CONS) {
              { Cons thevalue000 = ((Cons)(thevalue));

                typeexpression = thevalue000;
                if (thevalue000.value == Stella.SYM_STELLA_LIKE) {
                  basetype = null;
                }
                else {
                  basetype = Stella_Object.typify(thevalue000.value);
                }
              }
            }
            else {
              basetype = Stella_Object.typify(thevalue);
              if (Surrogate.definedTypeP(basetype)) {
                { StandardObject realtype = thevalue.yieldTypeSpecifier();

                  basetype = StandardObject.typeSpecToBaseType(realtype);
                  if (!(Stella_Object.typeP(realtype))) {
                    typeexpression = ((Cons)(StandardObject.yieldTypeSpecTree(realtype)));
                  }
                }
              }
            }
          }
          else if (key == Stella.KWD_ALLOCATION) {
            slotoptions.insertAt(key, thevalue.permanentify());
          }
          else if (key == Stella.KWD_READER) {
            slotoptions.insertAt(key, thevalue.permanentify());
          }
          else if (key == Stella.KWD_WRITER) {
            slotoptions.insertAt(key, thevalue.permanentify());
          }
          else if ((key == Stella.KWD_INVERSE) ||
              (key == Stella.KWD_RENAMES)) {
            slotoptions.insertAt(key, thevalue.permanentify());
          }
          else if ((key == Stella.KWD_PUBLICp) ||
              ((key == Stella.KWD_REQUIREDp) ||
               ((key == Stella.KWD_COMPONENTp) ||
                ((key == Stella.KWD_READ_ONLYp) ||
                 ((key == Stella.KWD_ACTIVEp) ||
                  ((key == Stella.KWD_CONTEXT_SENSITIVEp) ||
                   ((key == Stella.KWD_HARDWIREDp) ||
                    (key == Stella.KWD_ABSTRACTp)))))))) {
            slotoptions.insertAt(key, Stella_Object.coerceToBoolean(thevalue));
          }
          else if (key == Stella.KWD_DOCUMENTATION) {
            slotoptions.insertAt(key, thevalue);
          }
          else if (key == Stella.KWD_PROPERTIES) {
            slotoptions.insertAt(key, Stella_Object.collectFeatureList(thevalue));
          }
          else if (key == Stella.KWD_META_ATTRIBUTES) {
            slotoptions.insertAt(key, Stella_Object.collectKeyValueList(thevalue));
          }
          else if ((key == Stella.KWD_OPTION_KEYWORD) ||
              (key == Stella.KWD_OPTION_HANDLER)) {
            slotoptions.insertAt(key, thevalue.permanentify());
          }
          else {
            slotoptions.insertAt(key, thevalue);
          }
        }
      }
      theoptions.thePlist = null;
      slot = ((StorageSlot)(Symbol.defineStellaSlot(((Symbol)(name)), owner, basetype, typeexpression, ((KeywordKeyValueList)(slotoptions.reverse())))));
      Slot.recordSlotHomeModule(slot);
      return (slot);
    }
  }