public void helpFinalizeLocalSlot() {
    { StorageSlot self = this;

      { Stella_Class owner = ((Stella_Class)(self.slotOwner.surrogateValue));

        if ((self.allocation() == Stella.KWD_DYNAMIC) &&
            ((!Surrogate.subtypeOfP(owner.classType, Stella.SGT_STELLA_DYNAMIC_SLOTS_MIXIN)) &&
             (!owner.abstractP))) {
          {
            Stella.STANDARD_WARNING.nativeStream.println("Warning: Slot `" + self.slotName + "' on the class `" + Stella_Class.classSymbol(owner) + "'");
            Stella.STANDARD_WARNING.nativeStream.println("   can't have :dynamic slot allocation because the class doesn't");
            Stella.STANDARD_WARNING.nativeStream.println("   inherit the class `DYNAMIC-SLOTS-MIXIN'.  Resetting the");
            Stella.STANDARD_WARNING.nativeStream.println("   allocation to ':instance'.");
          }
;
          KeyValueList.setDynamicSlotValue(self.dynamicSlots, Stella.SYM_STELLA_SLOT_ALLOCATION, Stella.KWD_INSTANCE, null);
        }
        if (((Symbol)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Stella.SYM_STELLA_SLOT_RENAMES, null))) != null) {
          { StorageSlot renamesslot = ((StorageSlot)(Stella_Class.lookupSlot(owner, ((Symbol)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Stella.SYM_STELLA_SLOT_RENAMES, null))))));

            if (!(self.primaryType() == renamesslot.primaryType())) {
              {
                Stella.STANDARD_WARNING.nativeStream.println("Warning: Slot `" + self.slotName + "' renames a slot of a different kind");
                Stella.STANDARD_WARNING.nativeStream.println("   (e.g., a storage slot renaming a method slot, or vice-versa).");
                Stella.STANDARD_WARNING.nativeStream.println("  Cancelling the renames option.");
              }
;
              KeyValueList.setDynamicSlotValue(self.dynamicSlots, Stella.SYM_STELLA_SLOT_RENAMES, null, null);
            }
            else if (!(self.allocation() == renamesslot.allocation())) {
              {
                Stella.STANDARD_WARNING.nativeStream.println("Warning: Slot `" + self.slotName + "' renames a slot with a different");
                Stella.STANDARD_WARNING.nativeStream.println("   allocation.  Changing its allocation to `" + renamesslot.allocation() + "'.");
              }
;
              KeyValueList.setDynamicSlotValue(self.dynamicSlots, Stella.SYM_STELLA_SLOT_ALLOCATION, renamesslot.allocation(), null);
            }
          }
        }
        if (self.slotContextSensitiveP &&
            ((!Surrogate.subtypeOfP(self.slotOwner, Stella.SGT_STELLA_CONTEXT_SENSITIVE_OBJECT)) &&
             (!Surrogate.subtypeOfP(owner.classType, Stella.SGT_STELLA_CONTEXT_SENSITIVE_MIXIN)))) {
          { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

            {
              stream000.nativeStream.println("Class `" + self.slotOwner.symbolName + "' must inherit either the class CONTEXT-SENSITIVE-OBJECT");
              stream000.nativeStream.println("   or the class CONTEXT-SENSITIVE-MIXIN because it contains the");
              stream000.nativeStream.println("   context sensitive slot `" + self.slotName + "' ");
            }
;
            throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
          }
        }
      }
    }
  }