Early work-in-progress.
[sod] / layout.lisp
CommitLineData
abdf50aa
MW
1;;; -*-lisp-*-
2;;;
3;;; Layout for instances and vtables
4;;;
5;;; (c) 2009 Straylight/Edgeware
6;;;
7
8;;;----- Licensing notice ---------------------------------------------------
9;;;
10;;; This file is part of the Simple Object Definition system.
11;;;
12;;; SOD is free software; you can redistribute it and/or modify
13;;; it under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 2 of the License, or
15;;; (at your option) any later version.
16;;;
17;;; SOD is distributed in the hope that it will be useful,
18;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with SOD; if not, write to the Free Software Foundation,
24;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26(cl:in-package #:sod)
27
28;;;--------------------------------------------------------------------------
29;;; Layout objects.
30
31(defclass effective-slot ()
32 ((slot :initarg :slot :type sod-slot :reader slot-direct-slot)
33 (initializer :initarg :initializer
34 :type (or sod-initializer null)
35 :reader slot-initializer)))
36
37(defclass islots ()
38 ((class :initarg :class :type sod-class :reader islots-class)
39 (slots :initarg :slots :type list :reader islots-slots)))
40
41(defclass ichain ()
42 ((class :initarg :class :type sod-class :reader ichain-class)
43 (chain :initarg :chain :type sod-class :reader ichain-chain)
44 (body :initarg :body :type list :reader ichain-body)))
45
46(defclass ilayout ()
47 ((class :initarg :class :type sod-class :reader ilayout-class)
48 (ichains :initarg :ichains :type list :reader ilayout-ichains)))
49
50(defclass effective-method ()
51 ((message :initarg :message :type sod-message :reader method-message)
52 (class :initarg :class :type sod-class :reader method-class)))
53
54(defclass method-entry ()
55 ((method :initarg :method
56 :type effective-method
57 :reader method-entry-effective-method)
58 (ichain :initarg :chain :type ichain :reader method-entry-ichain)))
59
60(defclass vtmsgs ()
61 ((class :initargs :class :type sod-class :reader vtmsgs-class)
62 (body :initargs :body :type list :reader vtmsgs-body)))
63
64(defclass class-pointer ()
65 ((metaclass :initarg :metaclass
66 :type sod-class
67 :reader class-pointer-metaclass)
68 (ichain :initarg :chain :type ichain :reader class-pointer-ichain)))
69
70(defclass base-offset ()
71 ((class :initargs :class :type sod-class :reader base-offset-class)
72 (ichain :initargs :chain :type ichain :reader base-offset-ichain)))
73
74(defclass chain-offset ()
75 ((class :initargs :class :type sod-class :reader chain-offset-class)
76 (ichain :initargs :ichain :type ichain :reader chain-offset-ichain)
77 (target :initargs :chain :type ichain :reader chain-offset-target)))
78
79(defclass vtable ()
80 ((class :initargs :class :type sod-class :reader vtable-class)
81 (ichain :initargs :ichain :type ichain :reader vtable-ichain)
82 (body :initargs :body :type list :reader vtable-body)))
83
84;;;----- That's all, folks --------------------------------------------------