;;; -*-lisp-*- ;;; ;;; Layout for instances and vtables ;;; ;;; (c) 2009 Straylight/Edgeware ;;; ;;;----- Licensing notice --------------------------------------------------- ;;; ;;; This file is part of the Simple Object Definition system. ;;; ;;; SOD is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 2 of the License, or ;;; (at your option) any later version. ;;; ;;; SOD is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with SOD; if not, write to the Free Software Foundation, ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. (cl:in-package #:sod) ;;;-------------------------------------------------------------------------- ;;; Effective slot objects. (defclass effective-slot () ((class :initarg :class :type sod-slot :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)) (:documentation "Describes a slot and how it's meant to be initialized. Effective slot objects are usually attached to layouts.")) (defgeneric find-slot-initializer (class slot) (:documentation "Return the most specific initializer for SLOT, starting from CLASS.")) (defgeneric compute-effective-slot (class slot) (:documentation "Construct an effective slot from the supplied direct slot. SLOT is a direct slot defined on CLASS or one of its superclasses. (Metaclass initializers are handled using a different mechanism.)")) ;;;-------------------------------------------------------------------------- ;;; Instance layout objects. (defclass islots () ((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 "The collection of effective SLOTS defined by an instance of CLASS.")) ;;; Standard implementation. ;;;-------------------------------------------------------------------------- ;;; Effective methods. ;;;-------------------------------------------------------------------------- ;;; Vtable layout. ;;; vtmsgs ;;; base-offset ;;; chain-offset ;;; vtable ;;; Implementation. ;;;----- That's all, folks --------------------------------------------------