From e8ac760e2c70896465ea85dc6f7ca5a3dcb54eee Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Sun, 7 Oct 2012 15:02:15 +0200 Subject: [PATCH] Split the routines for generating accessor functions into a file that can be loaded at boot time --- src/clos/boot.lsp | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/src/clos/boot.lsp b/src/clos/boot.lsp index 6c3b6d8b3..bf5f3173b 100644 --- a/src/clos/boot.lsp +++ b/src/clos/boot.lsp @@ -15,40 +15,6 @@ (defconstant +builtin-classes-pre-array+ (make-array (1+ #.(length +builtin-classes-list+)))) -;;; ---------------------------------------------------------------------- -;;; Early accessors and class construction -;;; -;;; -;;; The following macro is also used at bootstap for instantiating -;;; a class based only on the s-form description. -;;; -(eval-when (:compile-toplevel :execute) - (defmacro with-early-make-instance (slots (object class &rest key-value-pairs) - &rest body) - (when (symbolp slots) - (setf slots (symbol-value slots))) - `(let* ((%class ,class) - (,object (si::allocate-raw-instance nil %class - ,(length slots)))) - (declare (type standard-object ,object)) - ,@(flet ((initializerp (name list) - (not (eq (getf list name 'wrong) 'wrong)))) - (loop for (name . slotd) in slots - for initarg = (getf slotd :initarg) - for initform = (getf slotd :initform (si::unbound)) - for initvalue = (getf key-value-pairs initarg) - for index from 0 - do (cond ((and initarg (initializerp initarg key-value-pairs)) - (setf initform (getf key-value-pairs initarg))) - ((initializerp name key-value-pairs) - (setf initform (getf key-value-pairs name)))) - when (si:sl-boundp initform) - collect `(si::instance-set ,object ,index ,initform))) - (when %class - (si::instance-sig-set ,object)) - (with-early-accessors (,slots) - ,@body)))) - ;;; ---------------------------------------------------------------------- ;;; Building the classes T, CLASS, STANDARD-OBJECT and STANDARD-CLASS. ;;;