(:finalized
t))))
+(macrolet ((define-layout-slot (slot (class) &body body)
+ `(define-on-demand-slot sod-class ,slot (,class)
+ (check-class-is-finalized ,class)
+ ,@body)))
+ (flet ((check-class-is-finalized (class)
+ (unless (eq (sod-class-state class) :finalized)
+ (error "Class ~S is not finalized" class))))
+ (define-layout-slot %ilayout (class)
+ (compute-ilayout class))
+ (define-layout-slot effective-methods (class)
+ (compute-effective-methods class))
+ (define-layout-slot vtables (class)
+ (compute-vtables class))))
+
;;;----- That's all, folks --------------------------------------------------
(sod-class-messages super)))
(sod-class-precedence-list class)))
-(define-on-demand-slot sod-class effective-methods (class)
- (compute-effective-methods class))
-
;;;--------------------------------------------------------------------------
;;; Instance layout.
(reverse chain)))
(sod-class-chains class))))
-(define-on-demand-slot sod-class %ilayout (class)
- (compute-ilayout class))
-
;;;--------------------------------------------------------------------------
;;; Vtable layout.
(compute-vtable class (reverse chain)))
(sod-class-chains class)))
-(define-on-demand-slot sod-class vtables (class)
- (compute-vtables class))
-
;;;----- That's all, folks --------------------------------------------------