public static Cons yieldDynamicSlotValueTree(StorageSlot slot, Stella_Object objectref, StandardObject returntype) {
    if (StorageSlot.standardDynamicSlotAccessP(slot)) {
      return (StorageSlot.yieldStandardDynamicSlotValueTree(slot, objectref, returntype));
    }
    { Keyword testValue000 = slot.allocation();

      if (testValue000 == Stella.KWD_DYNAMIC) {
        { Symbol answervar = Stella.localGensym("ANSWER");

          return (Cons.list$(Cons.cons(Stella.SYM_STELLA_VRLET, Cons.cons(Cons.cons(Cons.cons(answervar, Cons.cons(returntype, Cons.cons(StandardObject.typeToWalkedNullValueTree(slot.typeSpecifier(), slot.type()), Stella.NIL))), Stella.NIL), Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_FOREACH, Cons.cons(Stella.SYM_STELLA_IT, Cons.cons(Stella.SYM_STELLA_ON, Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_DYNAMIC_SLOTS, Cons.cons(objectref, Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(Stella.SYM_STELLA_WHERE, Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_EQp, Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_KEY, Cons.cons(Stella.SYM_STELLA_IT, Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_BQUOTE, Cons.cons(slot.slotName, Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(Stella.NIL, Stella.NIL))))), Cons.cons(Stella.SYM_STELLA_DO, Cons.cons((Slot.slotValueIsBareLiteralP(slot) ? Cons.list$(Cons.cons(Stella.SYM_STELLA_LET, Cons.cons(Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_WRAPPEDVALUE, Cons.cons(slot.type().typeToWrappedType(), Cons.cons(Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_VALUE, Cons.cons(Stella.SYM_STELLA_IT, Cons.cons(Stella.NIL, Stella.NIL)))), Stella.NIL), Stella.NIL)))), Stella.NIL), Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_SETQ, Cons.cons(answervar, Cons.cons(Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_WRAPPER_VALUE, Cons.cons(Stella.SYM_STELLA_WRAPPEDVALUE, Cons.cons(Stella.NIL, Stella.NIL)))), Stella.NIL), Stella.NIL)))), Cons.cons(Stella.NIL, Stella.NIL))))) : Cons.list$(Cons.cons(Stella.SYM_STELLA_SETQ, Cons.cons(answervar, Cons.cons(Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_VALUE, Cons.cons(Stella.SYM_STELLA_IT, Cons.cons(Stella.NIL, Stella.NIL)))), Stella.NIL), Stella.NIL))))), Cons.cons(Cons.cons(Cons.cons(Stella.SYM_STELLA_BREAK, Stella.NIL), Stella.NIL), Stella.NIL)))))))))), Cons.cons(answervar, Cons.cons(Stella.NIL, Stella.NIL)))))));
        }
      }
      else if (testValue000 == Stella.KWD_BIT) {
        throw ((StellaException)(StellaException.newStellaException("Allocation :bit IS NOT YET IMPLEMENTED").fillInStackTrace()));
      }
      else {
        { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

          stream000.nativeStream.print("`" + testValue000 + "' is not a valid case option");
          throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
        }
      }
    }
  }