;;;; tinyclos.scm ;;;; A port of Kiczales TinyCLOS to Chicken - felix ; ********************************************************************** ; Copyright (c) 1992 Xerox Corporation. ; All Rights Reserved. ; ; Use, reproduction, and preparation of derivative works are permitted. ; Any copy of this software or of any derivative work must include the ; above copyright notice of Xerox Corporation, this paragraph and the ; one after it. Any distribution of this software or derivative works ; must comply with all applicable United States export control laws. ; ; This software is made available AS IS, and XEROX CORPORATION DISCLAIMS ; ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE ; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ; PURPOSE, AND NOTWITHSTANDING ANY OTHER PROVISION CONTAINED HEREIN, ANY ; LIABILITY FOR DAMAGES RESULTING FROM THE SOFTWARE OR ITS USE IS ; EXPRESSLY DISCLAIMED, WHETHER ARISING IN CONTRACT, TORT (INCLUDING ; NEGLIGENCE) OR STRICT LIABILITY, EVEN IF XEROX CORPORATION IS ADVISED ; OF THE POSSIBILITY OF SUCH DAMAGES. ; ********************************************************************** ; [felix] I have stolen several optimizations from Eli Barzilay's Swindle code ; - thanks anyway! (module tinyclos (;export ; define-class define-generic define-method define-class* ; make-class make-generic make-method add-method make initialize slot-ref slot-value slot-set! class-of class-direct-supers class-direct-slots class-cpl class-slots generic-methods method-specializers method-procedure allocate-instance compute-cpl compute-slots compute-getter-and-setter compute-apply-generic compute-methods compute-method-more-specific? compute-apply-methods ; class? instance? generic? subclass? instance-of? class-name generic-name ; print-object ; add-primitive-class-of delete-primitive-class-of add-structure-class-of delete-structure-class-of add-extended-procedure-class-of delete-extended-procedure-class-of add-tagged-pointer-class-of delete-tagged-pointer-class-of ;