From: Chris Hanson Date: Wed, 25 Jun 1997 05:31:31 +0000 (+0000) Subject: Delete accessor slot properties after they are used. This prevents X-Git-Tag: 20090517-FFI~5106 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=096847d281be1deb1b015f969be2b4c4d390923a;p=mit-scheme.git Delete accessor slot properties after they are used. This prevents them from holding on to the generic procedures, and from defining identical methods for each subclass. --- diff --git a/v7/src/sos/slot.scm b/v7/src/sos/slot.scm index 9662a64b6..abe00ba70 100644 --- a/v7/src/sos/slot.scm +++ b/v7/src/sos/slot.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: slot.scm,v 1.5 1997/06/25 03:28:58 cph Exp $ +;;; $Id: slot.scm,v 1.6 1997/06/25 05:31:31 cph Exp $ ;;; ;;; Copyright (c) 1995-97 Massachusetts Institute of Technology ;;; @@ -41,7 +41,7 @@ (name #f read-only #t) (class #f read-only #t) (index #f read-only #t) - (properties #f read-only #t)) + (properties #f)) (define (slot-name slot) (guarantee-slot-descriptor slot 'SLOT-NAME) @@ -129,7 +129,12 @@ (lambda (keyword maker) (let ((accessor (slot-property slot keyword #f))) (if accessor - (add-method accessor (maker class name))))))) + (begin + (add-method accessor (maker class name)) + (set-slot-descriptor/properties! + slot + (del-assq! keyword + (slot-descriptor/properties slot))))))))) (install 'ACCESSOR slot-accessor-method) (install 'MODIFIER slot-modifier-method) (install 'INITPRED slot-initpred-method)))