X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/aa14a4cddcb96b681d5c19a2ec8bad382f43b264..1645e4335e58ef3a8f1cafb1834e93760d80d9ae:/src/class-layout-proto.lisp diff --git a/src/class-layout-proto.lisp b/src/class-layout-proto.lisp index bf1480b..d34bf8b 100644 --- a/src/class-layout-proto.lisp +++ b/src/class-layout-proto.lisp @@ -7,7 +7,7 @@ ;;;----- Licensing notice --------------------------------------------------- ;;; -;;; This file is part of the Sensble Object Design, an object system for C. +;;; This file is part of the Sensible Object Design, an object system for C. ;;; ;;; SOD is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -31,7 +31,7 @@ (export '(effective-slot effective-slot-class effective-slot-direct-slot effective-slot-initializer)) (defclass effective-slot () - ((class :initarg :class :type sod-slot :reader effective-slot-class) + ((%class :initarg :class :type sod-class :reader effective-slot-class) (slot :initarg :slot :type sod-slot :reader effective-slot-direct-slot) (initializer :initarg :initializer :type (or sod-initializer null) :reader effective-slot-initializer)) @@ -65,7 +65,7 @@ (export '(islots islots-class islots-subclass islots-slots)) (defclass islots () - ((class :initarg :class :type sod-class :reader islots-class) + ((%class :initarg :class :type sod-class :reader islots-class) (subclass :initarg :subclass :type sod-class :reader islots-subclass) (slots :initarg :slots :type list :reader islots-slots)) (:documentation @@ -88,7 +88,7 @@ (export '(vtable-pointer vtable-pointer-class vtable-pointer-chain-head vtable-pointer-chain-tail)) (defclass vtable-pointer () - ((class :initarg :class :type sod-class :reader vtable-pointer-class) + ((%class :initarg :class :type sod-class :reader vtable-pointer-class) (chain-head :initarg :chain-head :type sod-class :reader vtable-pointer-chain-head) (chain-tail :initarg :chain-tail :type sod-class @@ -106,7 +106,7 @@ (export '(ichain ichain-class ichain-head ichain-tail ichain-body)) (defclass ichain () - ((class :initarg :class :type sod-class :reader ichain-class) + ((%class :initarg :class :type sod-class :reader ichain-class) (chain-head :initarg :chain-head :type sod-class :reader ichain-head) (chain-tail :initarg :chain-tail :type sod-class :reader ichain-tail) (body :initarg :body :type list :reader ichain-body)) @@ -133,7 +133,7 @@ (export '(ilayout ilayout-class ilayout-ichains)) (defclass ilayout () - ((class :initarg :class :type sod-class :reader ilayout-class) + ((%class :initarg :class :type sod-class :reader ilayout-class) (ichains :initarg :ichains :type list :reader ilayout-ichains)) (:documentation "All of the instance layout for a class. @@ -151,8 +151,10 @@ ;;; vtmsgs +(export '(vtmsgs vtmsgs-class vtmsgs-subclass + vtmsgs-chain-head vtmsgs-chain-tail vtmsgs-entries)) (defclass vtmsgs () - ((class :initarg :class :type sod-class :reader vtmsgs-class) + ((%class :initarg :class :type sod-class :reader vtmsgs-class) (subclass :initarg :subclass :type sod-class :reader vtmsgs-subclass) (chain-head :initarg :chain-head :type sod-class :reader vtmsgs-chain-head) @@ -169,24 +171,24 @@ CHAIN-HEAD. The CHAIN-TAIL is the most specific superclass of SUBCLASS on this chain. The ENTRIES are a list of `method-entry' objects.")) -(export 'compte-vtmsgs) +(export 'compute-vtmsgs) (defgeneric compute-vtmsgs (class subclass chain-head chain-tail) (:documentation - "Return a VTMSGS object containing method entries for CLASS. + "Return a `vtmsgs' object containing method entries for CLASS. The CHAIN-HEAD describes which chain the method entries should be constructed for. - The default method simply calls MAKE-METHOD-ENTRY for each of the methods - and wraps a VTMSGS object around them. This ought to be enough for almost - all purposes.")) + The default method simply calls `make-method-entry' for each of the + methods and wraps a `vtmsgs' object around them. This ought to be enough + for almost all purposes.")) ;;; class-pointer (export '(class-pointer class-pointer-class class-pointer-chain-head class-pointer-metaclass class-pointer-meta-chain-head)) (defclass class-pointer () - ((class :initarg :class :type sod-class :reader class-pointer-class) + ((%class :initarg :class :type sod-class :reader class-pointer-class) (chain-head :initarg :chain-head :type sod-class :reader class-pointer-chain-head) (metaclass :initarg :metaclass :type sod-class @@ -198,7 +200,7 @@ This is somewhat complicated because there are two degrees of freedom. An instance of `class-pointer' is a pointer from a vtable to an `ichain' of - the the class's metaclass instance. In particular, `class-pointer' + the the class's metaclass instance. In particular, a `class-pointer' instance represents a pointer in a vtable constructed for CLASS and attached to the chain headed by CHAIN-HEAD; it points to an instance of METACLASS, and specifically to the `ichain' substructure corresponding to @@ -216,7 +218,7 @@ (export '(base-offset base-offset-class base-offset-chain-head)) (defclass base-offset () - ((class :initarg :class :type sod-class :reader base-offset-class) + ((%class :initarg :class :type sod-class :reader base-offset-class) (chain-head :initarg :chain-head :type sod-class :reader base-offset-chain-head)) (:documentation @@ -237,7 +239,7 @@ (export '(chain-offset chain-offset-class chain-offset-chain-head chain-offset-target-head)) (defclass chain-offset () - ((class :initarg :class :type sod-class :reader chain-offset-class) + ((%class :initarg :class :type sod-class :reader chain-offset-class) (chain-head :initarg :chain-head :type sod-class :reader chain-offset-chain-head) (target-head :initarg :target-head :type sod-class @@ -263,7 +265,7 @@ (export '(vtable vtable-class vtable-body vtable-chain-head vtable-chain-tail)) (defclass vtable () - ((class :initarg :class :type sod-class :reader vtable-class) + ((%class :initarg :class :type sod-class :reader vtable-class) (chain-head :initarg :chain-head :type sod-class :reader vtable-chain-head) (chain-tail :initarg :chain-tail :type sod-class